
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base target="_top"/>
<title>135微信编辑器，微信图文编辑器,微信图文美化编辑器,格式多方便的图文编辑-</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="x-rim-auto-match" content="none">
<meta name="Keywords" content="135微信编辑器，微信图文编辑器，微信图文美化编辑器，图文美化编辑器，方便的微信编辑器" />
<meta name="Description" content="135微信编辑器，微信图文美化编辑器提供美化微信图文消息的功能，有非常多漂亮的样式，可直接插入编辑区域然后修改文字即可，轻松编辑非常美观的微信图文消息。" />
<meta name="360-site-verification" content="31358107aba10dc30e1c5f69501565fa"/>

<script>
function getQueryVariable(variable) {
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split("=");
		if(pair[0] == variable){return pair[1];}
	}
	return null;
}
</script>
<script>

var BASEURL = window.location.origin;
var current_editor;
var current_active_135item = null;
var current_media_id = getQueryVariable('mid');
var current_media_idx = getQueryVariable('idx');
var fav_colors = [];
</script>
<link href="https://static.135editor.com/cache/bootstrap_2.css" rel="stylesheet" type="text/css" >
<link href="/cache/02925458fc-v1811.css" rel="stylesheet" type="text/css" >
<script>
  window.addEventListener('message', function (event) {

      if (typeof event.data !== 'string') return;  // 增加此行代码

      editor.setContent(event.data);

      dialog.close();

  }, false);
</script>
<!--[if lt IE 9]>
    <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/fonts/icon135/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/css/searchableSelect.css" />
<link rel="stylesheet" type="text/css" href="/js/cropper/cropper.min.css" />

<script type="text/javascript" src="/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-4.0.min.js"></script>
<script type="text/javascript" src="/js/cropper/cropper.min.js"></script>
<script  type="text/javascript"  src="/js/cropper/jquery-cropper.min.js"></script>
</head>
<body class="hide-side" style="overflow-y:auto;overflow-x:auto;margin:0 0;padding:0;background-color:#ecedee;background-size: cover !important;background:url(https://bdn.135editor.com/files/201904/65c9d425gy1fhld6zzko1j21hc0u03yp.jpg);" oncontextmenu="return false;">
<style>
.nav-tabs {border-bottom: 1px solid #474753;}
header,.footer-top,.footer-bottom {display:none !important;}
* {margin:0;padding:0;box-sizing: border-box!important;-webkit-box-sizing: border-box!important;word-wrap: break-word!important;}
body,h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6{font-family: "Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif !important;}
html{line-height:1.6;font-size:16px;}
body{margin: 0 0;font-size:16px;background-image:none;background-color:#e7e8eb;background-size: cover;background-repeat: no-repeat;line-height:inherit}
._135editor{max-width:100% !important;}
h1,h2,h3,h4,h5,h6{font-weight:400;font-size:18px}
#maincontent{background-color:transparent !important;}
#edui_fixedlayer{z-index:1000000 !important;}
.tooltip{z-index:1000005;}
p{clear:both;margin:0 0;min-height:1em;}

table.noBorderTable td,table.noBorderTable th,table.noBorderTable caption{border:1px dashed #ddd!important}
table{border-collapse:collapse;display:table;width:100%!important}
.table-noborder>thead>tr>th, .table-noborder>tbody>tr>th,.table-noborder>tbody>tr>td, .table-noborder>tfoot>tr>th,.table-noborder>tr>td, .table-noborder>thead>tr>td, .table-noborder>tbody>tr>td, .table-noborder>tfoot>tr>td{
	border:0 none !important;
}
td,th{word-wrap:break-word;word-break:break-all;padding:5px 10px !important;border:1px solid #DDD}
.edui-default td,.edui-default th{border:0 none;padding:0 0 !important;}
caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center}
th{border-top:2px solid #BBB;background:#f7f7f7}
.ue-table-interlace-color-single{background-color:#fcfcfc}
.ue-table-interlace-color-double{background-color:#f7faff}
 td p{margin:0;padding:0;width:auto;height:auto;}

ul{padding-left: 0;}
ul li{list-style: none;}
h1,h2,h3,h4,h5,h6{font-weight:400;font-size:18px}
a,a:hover, a:focus {text-decoration: none;}
::-webkit-scrollbar {width:6px;height:6px;background: #f1f1f1;}
::-webkit-scrollbar-thumb {-webkit-box-shadow: inset 0 0 16px #c1c1c1;}
::-webkit-input-placeholder {color:#aaa;}
:-moz-placeholder {color:#aaa;}
::-moz-placeholder {color:#aaa;}
:-ms-input-placeholder {color:#aaa;}
.popover{max-width:360px;}
.modal-backdrop.in {opacity: 0.8;}
#insert-style-list .alert-warning {background-color: #fafafa;border: 0 none;margin:0;color: #3a3332;}
#header-breadcrumb{display: none;}
.footer-bottom{padding:2px;font-size:80%;}
#maincontent {margin:0;padding:0;}

#left-sidebar .ui-portlet{margin:0px;}
#left-side-affix{box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
#left-sidebar .btn-group .btn{padding:4px 16px;}
.modal-backdrop{z-index: 1000000;}
.modal-open .modal,.modal{z-index: 1000050;}
.mix{display: none;}

.cke_reset_all, .cke_reset_all *{
	position: initial;
}
.affix{top:0px;background-color:#FFF;z-index:100;position: fixed;}
.col-sm-6 {width: 49%;}
.color-swatch{width:18px;height:18px;border-radius:3px;cursor: pointer;float:left;margin:3px 2px;}

#all-style-color-panel .all-color-swatch{width:30px;height:30px;border-radius:50%;cursor: pointer;float:left;margin:3px 2px;}

.color-box {width:16px;height:16px;cursor: pointer;border:solid 1px #ddd;margin-top:3px;float: left;margin-right:5px;}
.color-swatch:hover,.color-swatch.active {
	-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);
	-o-transform:scale(1.1);transform:scale(1.1);
	-webkit-box-shadow:inset 1px 1px 1px #5b616d,0 0 5px #45bcda;
	-moz-box-shadow:inset 1px 1px 1px #5b616d,0 0 5px #45bcda;
	box-shadow:inset 1px 1px 1px #5b616d,0 0 5px #45bcda;
}
.n1-1 > li {width: 100%;color: #dad9d8;text-align: center;}
.n1-1 ul.dropdown-menu > li {width: 100%;}
.n1-1 > li > a{display:block;line-height:32px;color:#fff;text-decoration:none;font-size:14px;border:0 none !important;padding:0;}
.n1-2 > li > a{line-height:32px;}


.bg-header{background-color: rgba(45,46,61,0.5);box-shadow: 0 0px 10px;margin-bottom: 2px;}
.w1{background-color: rgba(45,46,61,0.5);overflow: hidden;width: 120px;}
.ifo{background-color: rgba(45,46,61,0.5);}
.n1-1 .nav-item .nav-link.active,.n1-1 .nav-item .nav-link:hover{background:rgba(45,46,61,0.6);text-decoration:none;border:0 none !important;color:#ff793f;padding:0;border-radius: 0;}
#left-advertises > li > a{font-size:13px;}
#left-advertises  li:nth-child(1) a:hover,#left-advertises  li:nth-child(2) a:hover{color:red;}
#nav-header .category-nav > li:nth-child(4){
	background-image:url(/img/small/hot.png);background-repeat: no-repeat;background-position: 100% 2px;
}
 .toparrow {
    position: absolute;    padding: 2px 5px;    font-size: 13px;    transform: scale(0.8);    color: #fff;    border-radius: 4px;
    background: #FF8C00;    z-index: 5;
}
.toparrow:after {
    top: 100%;
    left: 3px;
    border-top: solid transparent;
    border-right: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-color: rgba(136, 183, 213, 0);
    border-top-color: #FF8C00;
    border-width: 4px;
    margin-left: 0px;
}
 .rightarrow {
    position: absolute;    padding: 2px 5px;    font-size: 13px;    line-height: 13px;    transform: scale(0.8);    color: #fff;
    border-radius: 4px;    background: #FF8C00;    z-index: 5;    top: 5px; right: -15px;
}
.rightarrow:after {
    top: 50%;
    left: -5px;
    border-top: solid transparent;
    border-right: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-color: rgba(136, 183, 213, 0);
    border-right-color: #FF8C00;
    border-width: 5px;
    margin-left: 0px;
}
.col-sm-4,.col-sm-6,.col-sm-2{padding-right: 5px;padding-left: 5px;}
#params-setting ul{padding:0;}
#params-setting .title{font-size:16px;font-weight:bold;padding-bottom:3px;margin-bottom:5px;margin-top:15px;border-bottom:1px solid #DDD;}
#params-setting li{list-style:none;}
#params-setting label{display:block;line-height:18px;font-weight:normal;}
#params-setting input{margin-right:5px;margin-top:3px;float:left;}
.cke_button__source_label{display:none;}
.cke_combo__font .cke_combo_text{padding-left:5px;width:60px;}
.cke_combo__styles .cke_combo_text{width:80px;}
.cke_chrome {border: none;box-shadow: 0 0 1px 1px rgba(172,181,194,0.56);}
#editor-styles .nav > li > a{padding:10px 5px;text-align:center;}

#insert-style-list{background:rgba(255,255,255,1);}

#tpl-tab-content .style-list .pr{position:relative;height:200px;overflow: hidden;}
#tpl-tab-content .style-list .tpl-mask{position:absolute;background:rgba(60,60,60,0.7);top:0px;left:0px;    width: 100%;height: 100%;color: #FFF;display: table-cell;text-align: center;}
#tpl-tab-content .style-list .pr:hover .tpl-mask{display:block !important;}
#tpl-tab-content .style-list .tpl-mask .fa{font-size:20px;cursor:pointer;margin-bottom:10px;display: inline-block; border: 1px solid #fff; padding: 5px 15px; border-radius: 3px;}

#tpl-tab-content .editor-style-content{cursor:pointer;}

#tpl-tab-content .style-list{margin-top:20px;position: relative;box-shadow: 0 0 10px 0 #ccc;}
#tpl-tab-content .style-list .user-style-toolbar{position:absolute;right:5px;bottom:5px;display:none;color:#157ab5;}
#tpl-tab-content .style-list .user-style-toolbar .fa {cursor:pointer;}
#tpl-tab-content .style-list:hover .user-style-toolbar{display:block;}
#tpl-tab-content .style-list .content, #template-modal-body .style-list .content{cursor: pointer;overflow-x:hidden;overflow-y:hidden;box-shadow: 0 0 3px rgb(170, 170, 170);}
#system-template-list .tpl-mask div{margin-top:28% !important;}
#tpl-tab-content .style-list .tools,#template-modal-body .style-list .tools{display:none;}
#tpl-tab-content .row{margin:0 -5px;}
.popover-content .btn{margin-top:3px;padding: 1px 5px;}
#more-popover .popover-content{padding: 5px 5px;width:160px;max-width:360px;height:160px;}

/* */
#color-plan {right:-230px  !important;left:auto !important;z-index: 1;width:120px;position:absolute;text-align: center;display:none;}
#color-plan .nav-tabs > li > a{padding:1px;color: #efefef;border: 0 none;}
#color-plan .nav-tabs > li > a:hover{background:transparent;color:#FFF;}
#color-plan .nav-tabs > li.active > a,#color-plan  .nav-tabs > li.active > a:hover,#color-plan  .nav-tabs > li.active > a:focus {background-color: #000;color: #FFF;border: 0 none;}
#login-user-name{max-width: 45px;overflow: hidden;white-space: nowrap;}

#insert-style-list li .vip-flag,#style_search_list li .vip-flag{position:absolute;top:0px;right:0px;width:150px;text-align:right;font-size:14px;color:orange;}
#insert-style-list li .is-original,#style_search_list li .is-original{
    position:absolute;top:0px;left:0px;width:51px;height:53px;background-size:contain;
    background-image:url(https://bdn.135editor.com/files/users/0/1/201810/sxH97ZAz_OWZk.png);
}
#insert-style-list li .btns,#style_search_list li .btns{position:absolute;bottom:0px;right:0px;font-size:14px;color:rgb(255, 129, 36);width:235px;text-align:right;display:none;}
#insert-style-list li .btns a,#style_search_list li .btns a{font-size:14px;color:rgb(255, 129, 36);}
#insert-style-list #editor-template-scroll li:hover .btns,#style_search_list li:hover .btns{display:inline;}
#insert-style-list li,#styleSearchResultList li,#styleRecentList li {position:relative;background: #FFF;border-bottom: 1px dotted #ddd;padding: 10px 15px;cursor:pointer;}
#insert-style-list li.active a,#insert-style-list li.active a:focus{background:transparent;}
#insert-style-list img,#styleSearchResultList img,#styleRecentList img{max-width: 100%;}
#insert-style-list li:hover,#styleSearchResultList li:hover,#styleRecentList li:hover{box-shadow: inset 0 0 10px 0px #ccc;}

#insert-style-list .nav > li {padding:0 0;}
#preview-msg-content,#insert-style-list .ui-portlet-list{font-size:16px;}
#preview-msg-content *,#insert-style-list .ui-portlet-list > li *{max-width: 100%!important;font-size:inherit;margin:0;padding:0;font-style: normal;box-sizing: border-box!important;-webkit-box-sizing: border-box!important;word-wrap: break-word!important;}
#preview-msg-content td,#preview-msg-content th,#insert-style-list .ui-portlet-list > li td,#insert-style-list .ui-portlet-list > li th{padding: 5px 10px;}
#insert-style-list .ui-portlet-list > li p{clear:both;margin:0 0;line-height: inherit;}
#insert-style-list .ui-portlet-list > li p span,#insert-style-list .ui-portlet-list > li p strong{font-size:inherit;}
#insert-style-list .origin{position:absolute;top:5px;right:5px;height:20px;color:#FFF;font-weight:bold;font-size:12px;padding:2px}

#editor-template-scroll .pagelink {display:none;}
.pagelink{text-align:center;margin: 10px 0;}
.pagelink .bg-primary {
    color: #fff;
    background: #ff793f !important;
    padding: 5px 8px;
}

#insert-style-list iframe,#insert-style-list .video_iframe {background-color: #000000;width: 100% !important;position: static;}

img {vertical-align: baseline;max-width: 100%;}
/* fix Firefox - max-width images not working within fieldset */
fieldset img{width: 100%;max-width: -moz-fit-content;max-width: -webkit-fit-content;}

#editor-tpls-navtab > li,#editor-my-msgs > .nav-tabs > li {padding:0 0;}

.editor-nav .fa,.editor-nav .glyphicon{width:20px;text-align:center;margin:0 auto;}

.w2 .col-md-4 {flex: 0 0 100%;max-width: 100%;}
.w2 .row{margin-left: -5px;margin-right: -5px;}
#editor-my-msgs #wechat-article-list .col-md-4 .submsg-title {clear:both;}
#editor-my-msgs #wechat-article-list .col-md-4 .submsg-title .title{font-size:14px;font-weight: normal;}
#style-operate-area .col-md-4,#editor-msg-list .col-md-4{flex: 0 0 100%;max-width: 100%;padding:0 10px;}
#my-article-list .col-sm-4 {width:auto;padding: 5px;flex: 0 0 auto;}

#html-parsers-items .col-md-4 {width:50%;flex: 0 0 50%;max-width: 50%;}
#html-parsers-items .col-md-4  img{height:200px;text-align:center;max-width:100%;}
#html-parsers-items .appmsg{margin: 10px 0;padding: 10px 0;overflow: hidden;}

#nav-header .nav>li>a{color:#FFF;padding: 0 15px;line-height: 36px;}
#nav-header .nav .open > a{background-color: inherit;}
#nav-header .nav>li>a:hover,#nav-header .nav>li>a:focus{color:#FFF;background-color: rgba(255,255,255,0.2);}

.small-height #nav-header{position:absolute;width:140px;background:RGBA(255,255,255,0.3); margin-left:5px;padding:10px 10px; }
.small-height #nav-header .nav>li>a{width:120px;text-align: right;}
.small-height .open > .dropdown-menu {display: block;top: 0;left:99%;}
.small-height #login-menus ,.small-height #login-links{margin-top:20px;}
.small-height #nav-header:hover{z-index:1000;}

#user-operate-menu {width:200px;line-height: 28px;}

.nav > li> a .user-unread-msgnum{background: #fa5937;color:#FFF;line-height:16px;display:none;text-align:center;padding:2px 5px;margin-left:2px;font-size: 14px;font-weight: bold;}

.editorslide {right:-80px;width:80px;bottom:initial;top: 260px;}
.editorslide:hover{z-index:10;}
.editorslide li {width: 90px;}
#WxMsgContent{width:100%;overflow: hidden;}
#WxMsgContent + textarea {display: none;}
#feedsModal {clear:none;}
#nav-header{z-index: 10;}
.edui-default .edui-editor-toolbarboxinner .edui-toolbar:nth-child(3) {border-bottom: 1px solid #DDD;}
.edui-default .edui-for-fontfamily .edui-listitem-label{font-size:16px !important;}
.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap,.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body, .edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body {
    background-color: #eee !important;padding: 1px !important;border: 0 none !important;
}

.modal-header h3{margin:0 10px;}
.tpl-brush-helper{margin-bottom:10px;}
#image-list .col-sm-4{margin-bottom:20px;position: relative;}
#image-list .appmsg{max-width: 110px;width: 110px;height:165px;font-size:12px;position:relative;text-align: center;background-color:rgba(237,229,224,0.95);padding: 3px 3px 30px;}

#image-list #images-list .appmsg{padding:3px;}
#image-list .appmsg .img-opr{ text-align: left;width: 100%;}
#image-list .appmsg .cover {height:100px;width:100px;vertical-align: middle;display: table-cell;}
#image-list .appmsg img{max-height:90px;cursor:pointer;}

#upload-image-list-li .col-sm-4 {
	flex: 0 0 50%;
    max-width: 50%;
}
#upload-image-list-li .appmsg,#allimage-list-li .appmsg {
	width: 100%;
	max-width: 100%;
}
#upload-image-list-li .appmsg img,#allimage-list-li .appmsg img {
	max-width: 100%;
	max-height: none;
}
#upload-image-list-li .appmsg .cover, #allimage-list-li .appmsg .cover {
	width: 100%;
	height: auto;
	max-height: 165px;
    display: flex;
    overflow: hidden;
}

#image-preview {position:absolute;left:0px;width:100%;z-index: 100;color:red;text-align:center;overflow:hidden;background-color:#FFF;border:10px solid #f3f3f3;display:none; top:60px;padding: 20px 0;}
#image-preview img{height:auto;width:auto;max-width:100%;padding:10px 10px;background-color:#fff;}
/*
#image-list .appmsg:hover {z-index:10;position: absolute;max-width:360px;width:360px;padding:5px 10px;display: table-cell;}
#image-list .appmsg:hover img{max-width:360px;}

#favor-image-li .col-sm-4:nth-child(3n+1) .appmsg:hover,#split-image-list-li .col-sm-4:nth-child(3n+1) .appmsg:hover ,#guide-image-list-li .col-sm-4:nth-child(3n+1) .appmsg:hover ,#upload-image-list-li .col-sm-4:nth-child(3n+1) .appmsg:hover  {
	left:0;text-align:left;
}
#favor-image-li .col-sm-4:nth-child(3n+2) .appmsg:hover,#split-image-list-li .col-sm-4:nth-child(3n+2) .appmsg:hover ,#guide-image-list-li .col-sm-4:nth-child(3n+2) .appmsg:hover ,#upload-image-list-li .col-sm-4:nth-child(3n+2) .appmsg:hover  {
	left:-100%;text-align:center;
}
#favor-image-li .col-sm-4:nth-child(3n+3) .appmsg:hover,#split-image-list-li .col-sm-4:nth-child(3n+0) .appmsg:hover ,#guide-image-list-li .col-sm-4:nth-child(3n+0) .appmsg:hover ,#upload-image-list-li .col-sm-4:nth-child(3n+0) .appmsg:hover  {
	right:0;text-align:right;
}*/

ol.sync-article-list { list-style-type: none;}
ol.sync-article-list li{cursor: pointer;}
body.dragging, body.dragging * {cursor: move !important;}
.dragged { position: absolute;top: 0; opacity: 0.5;  z-index: 2000;}
ol.sync-article-list li.placeholder { position: relative;margin: 0; padding: 0;border: none;}
ol.sync-article-list li.placeholder:before {  position: absolute;content:" ";width: 0; height: 0;margin-top: -5px;left: 0px; top: -4px; border: 8px solid transparent;border-left-color: red;border-right: none;}

.appmsg_opr {text-align: center;margin-top: 10px;}
.appmsg_opr a {   display: block; padding:0;font-size:16px;color:#999;margin:0 auto;}
.appmsg_opr a:hover{color:#ff793f;}
.article-msg{
	border-bottom: 1px solid #eee;
	padding: 15px 0;
	cursor:pointer;position:relative;
	line-height:1.8em;
}
.article-msg .title{font-size:16px;font-weight:bold;}
.article-msg .cover{float:right;margin-left:15px;}
.article-msg img{width:48px;height:48px;}
.article-msg .summary{clear:none;}
.article-msg  p {min-height:0;clear:none;}

#wechat-msg-mine-list .article-msg {cursor: default;}
#wechat-msg-mine-list .appmsg_content{position:relative;}
#wechat-msg-mine-list .appmsg_content img{width:100%;height:150px;}
#wechat-msg-mine-list .appmsg_content p{position: absolute;bottom: 0px;padding: 5px 10px;width: 100%;background-color: rgba(55,55,55,0.6);}
#wechat-msg-mine-list .appmsg_content p a,#wechat-msg-mine-list .appmsg_content p a:hover{color:#FFF;text-decoration: none;cursor:pointer;}
#wechat-msg-mine-list .article-msg p .wechat-edit{display:block !important;float:left;height:60px;visibility: visible !important;cursor:pointer;font-size: 32px;width: 40px;}
#wechat-msg-mine-list .article-msg p .wechat-edit .fa-edit{color: greenyellow;}
#wechat-msg-mine-list .appmsg_content p.appmsg_desc{display:none;}
#wechat-msg-mine-list .submsg-title{clear:both;padding:2px;}
#wechat-msg-mine-list .appmsg_opr {border-top: 1px solid #ddd;}
#wechat-msg-mine-list .article-msg{border-bottom:0 none;padding-bottom:0px;}
#user-unreadmsg-list > ul > li{border-bottom: 1px solid #eee;font-size: 14px;}
#user-unreadmsg-list > ul > li > a{color: #337ab7;}
#user-unreadmsg-list > ul > li > a.readed{color:#999;}

#style_search_list ul > li {border-bottom:1px solid #DDD;padding: 10px 15px;cursor: pointer;}

#style-categories li > ul > li{padding:0 0;}
#style-categories .open > .dropdown-menu{display:block;padding:0 0;background: RGBA(0,0,0,0.6);left:0;top:99%; padding: 0;}
#style-categories .open > .dropdown-menu a{color:#333;line-height: 29px;padding: 3px 20px;}

#style-categories .open > .dropdown-menu a.active,#style-categories .open > .dropdown-menu a:hover{
	background: #eee;text-decoration: none;
}
.filter-adv:hover{background-position:0 24px;}
.more-filter a{color: #666;margin-right:2px;cursor: pointer;}
.more-filter a.active,.more-filter a.active:hover {color: #ff8124;}
.more-filter .dropdown-menu li{padding:0 !important;}
.more-filter .dropdown-menu li a{margin-right:0;}

#editor-msg-list .delete-pop{padding-left:0px;}
.edui-default .edui-editor {left:0 !important;top:0 !important;background-color:transparent !important;width: 100% !important;border:0 none !important;}
.edui-default .edui-dialog-content{margin:0px 5px;}
.edui-default .edui-editor-toolbarbox,.edui-default .edui-editor-toolbarboxouter{z-index: 1000;border: 0 none !important;-webkit-box-shadow: none !important;box-shadow: none !important;background: #FFF !important;}
.edui-default .edui-editor-toolbarboxinner{padding:0 !important;}
.edui-default .edui-for-insertimage .edui-dialog-content{width: 980px !important;height: 450px !important;}
.edui-default .edui-for-135BgDialog .edui-dialog-content  {width:640px !important;height:450px !important;}

.edui-default .edui-editor-iframeholder{background: #FFF;}

.show-edui-more .edui-editor-iframeholder{margin-top:30px !important;}


.edui-for-paragraph .edui-button-body{width:40px !important;}
.edui-for-fontfamily .edui-button-body{width:50px !important;}
.edui-for-fontsize .edui-button-body{width:32px !important;}
.edui-default .edui-editor-bottomContainer td{padding-bottom: 2px !important;border: 0;background: #fff;}

.CodeMirror{background-color: #FFF;}
.edui-default .edui-toolbar .edui-combox .edui-combox-body{background-color: rgba(255,255,255,0.3) !important;}
.cp-app {z-index:10000;}
/*.S .cp-panel .cp-ctrl {display:none;}  .S .cp-panel .cp-col1*/
.cp-panel .cp-bres{display:none;}
.cp-panel .cp-bsav{width:100% !important;}
.cp-app .cp-raster{opacity: 1 !important;background: rgb(51,51,51) !important;}
.cp-panel .cp-disp {background-color: #FFF;color: #333;background-image:none !important;}
.S .hsv-h .cp-rgb{display: block !important;}
.S .cp-hsv,.cp-panel .cp-ctrl {display:none;}

#right-fix-tab li{border:0 none;color:#FFF;font-size:15px;float: none;width:100%;}


ul.marquee{display:block;padding:0;margin:0;list-style:none;line-height:1;position:relative;overflow:hidden;}ul.marquee li{display:block;white-space:nowrap;font:14px Arial,Helvetica,sans-serif;padding:3px 5px;}
/*
#user-unreadmsg-list > ul > li{font-size: 14px;line-height: 36px;}
#user-unreadmsg-list > ul > li > a{color: #fff;}
#user-unreadmsg-list > ul > li > a.readed{color:#eee;}
#user-unreadmsg-list h3,#user-unreadmsg-list p {display:none;}
*/

.nav-toolbars{margin:0px auto;border-bottom:0 none !important;}
.nav-toolbars > li {background:transparent !important;width:15%;padding: 0 0 !important;border-bottom:0 none !important;}
.nav-toolbars > li > a{border:0 none !important;padding: 5px 0px;line-height: 26px;}
.nav-toolbars .open >a,.nav-toolbars .open >a:hover,.nav-toolbars .open >a:focus,.nav-toolbars > li > a.active,.nav-toolbars > li > a:hover,.nav-toolbars > li > a:focus{border:0 none !important;background:rgba(215,215,215,0.9);padding: 5px 0px;color:#ff8124 !important;opacity:1;}
.nav-toolbars > li > a .icon135{font-size:22px;}
.tooltip.show{opacity:1}
.tooltip-inner{padding:1px 10px;font-size:12px;text-align: left;line-height:18px;color:#fff;background-color: rgba(35, 35, 35, 0.8);word-wrap:break-word;word-break:break-all}
.arrow::before,.bs-tooltip-top .arrow::before,.bs-tooltip-auto[x-placement^="top"] .arrow::before{top:0px;border-width:5px 5px 0;border-top-color:rgba(35, 35, 35, 0.8);}

#style-sorts .active{color:#ff8124;}

#colors-tab-content .style-list{margin: 15px 3px 20px;box-shadow: 0 0 3px rgba(172,165,150,0.5);background:#ede8de;padding:0px;position:relative;border-radius:2px;}
#colors-tab-content .style-list:hover{z-index:20;box-shadow: 0 0 5px rgba(172,165,150,0.5);}
#colors-tab-content .style-list:hover .tools{display:block;}
#colors-tab-content .style-list .content{background:#fefefe;padding:13px;}
#colors-tab-content .style-list .tools{text-align:left;width:100%;padding:15px;color:#FFF;}
#colors-tab-content .style-list .tools a,.style-list .tools a:hover{text-decoration: none;color:#3a3332;font-size:16px;}
#colors-tab-content .style-list .tools .title{height:24px;line-height:24px;}

.popover{padding:0px 5px;width: auto;}
.popover-body{background: rgba(58,51,50,0.9);color:white;}

.draft-item .popover-body{ background: #FFF; }
.popover-body .btn{margin:5px;width:auto;cursor: pointer;}
.popover.bs-popover-right > .arrow{border-right-color:transparent;}
.popover.bs-popover-left > .arrow{border-left-color:transparent;}
.popover.bs-popover-right > .arrow:after{border-right-color: rgba(58,51,50,0.9);}
.popover.bs-popover-left > .arrow:after{border-left-color: rgba(58,51,50,0.9);}
.more-popover-content .btn-xs{font-size:12px;margin:0px 0 5px;border-color:#FFF;color:#FFF;border: 0 none;background: transparent;color: #FFF;border: 1px solid #FFF;}
#tpl-brush-board-content ._135editor{cursor: pointer;}
#tpl-brush-board-content ._135editor:hover{box-shadow:0 0 6px 0px #ff793f;}
#user-draft-chooser .modal-dialog{width:964px;max-width: 964px;}
#user-draft-chooser .draft-item.active{background: #f4f4f4;}

#fileuploadinfo_WxMsgCoverimg {position: absolute;right:15px;top: 0;background:#FFF;padding: 5px;z-index: 1;}
#fileuploadinfo_WxMsgCoverimg img {max-width: 200px;display: block;}
#edui_fixedlayer ~ div iframe {display: none;opacity:0;}
.FotorFrame iframe{display: block !important;opacity:1 !important;}
.FotorFrame{width:90% !important;height:90% !important;display:none;z-index:1000090 !important;position:absolute;top:5% !important;left:5% !important;}
.modal-body div iframe ,.mh_dialog iframe,#qiframe{display: inline-block !important;opacity: 1 !important;width: 100%;}
.transparent,.transparent .modal-content{background: transparent;box-shadow: none;border: 0 none;}
.transparent .modal-header {border: 0 none;color: #FFF;position: absolute;top:0px; right: -30px;z-index: 1000; }
.transparent .close{color: #FFF; opacity: 0.6;}
.transparent .modal-dialog{width:900px;}
.coverimg-btns .btn{height:34px;font-size: 14px;line-height:34px;padding:0 10px;}

#top-style-tools{width:384px;}
/* 【【【【【【弹出框边框】】】】】】 */
.modal-content{border: 0;}
/* 【【【【【【登录框】】】】】】 */
#login-form .nav-tabs{justify-content: center;}
#login-form, p#login-form h4 {text-align: center;}
#tab-login-form .btn-primary {
    background: linear-gradient(to right,#ff793f,#fc654e);
    border: 0;
}
.reg-page a{color: #ff793f;}
.reg-page p{text-align: left;}
.reg-page input{border-radius: 5px !important;}
/* 【【【【【【焦点链接】】】】】】 */
.nav-link.active {border: 0;border-bottom: 2px solid #ff793f !important;}
.tab-pane .nav-link.active{color: #ff793f;text-align: center;}
/* 【【【【【【一键排版】】】】】】 */
#style-categories .dropdown-menu a{font-size:14px;display: block;padding:0 10px;}
#html-parsers-list > div:nth-child(1){
    border: 2px dashed #ccc !important;
    background-color: unset !important;
    color: #737373 !important;
}
#html-parsers-options section{border: 0 !important;}
#html-parsers-options section > p:nth-child(1){
    border-left: 5px solid #ff793f;
    padding-left: 5px;
    font-size: 16px !important;
    margin-left: -8px;
}
#html-parsers-options select,#html-parsers-options input{
    width: 135px !important;
    color: #999;
}
#html-parsers-options i{color: #ced6e5;font-size: 18px;}
.yijian-mengban{
    background-color:rgba(76,76,76,.8);
    position:absolute;
    width:100%;
    height:100%;
    top:0;
    left:0;
    font-size:12px;
    color: #EF7060;
    display:none;
}
.yijian-content:hover .yijian-mengban{display:block;}
#html-parsers-options + div{background-color:#f4f4f4;}
.yijian-content>div:nth-child(1){background-color:#fff;}
/* 【【【【【【图片素材】】】】】】 */
.image-filter{color: #ff793f;}
#editor-image-navtab li{width: 20%;}
#image-list>div:nth-child(1) button,#image-list>div:nth-child(1) button~a{
    background: #fff;
    border-color: #ccc;
    color: #373737;
    padding: 5px 3.5%;
    border-radius: 0;
}
#image-list>div:nth-child(1) button:nth-child(1),#image-list>div:nth-child(1) button:nth-child(2) {
    display: none;
}
#icon-list-li .ui-portlet>div{margin-bottom: 10px;}
#image-list .ui-portlet .appmsg{background: unset;}
#image-list .ui-portlet .desc{text-align: center !important;}
#icon-list-li .ui-portlet .desc{margin-top: -20px;}
#icon-list-li .ui-portlet img{max-height:50px;}
#editor-image-navtab{border-top:1px solid #eee !important;}
.image-filter>div a{color:#666;margin-right: 10px;}
.image-filter>div a:hover{color:#ff793f;}
/*【【【【【【模板】】】】】】*/
.go-login{display:inline-block;padding: 5px 20px; background-color:#ff793f;color:#fff;text-align:center;}
.go-login:hover{color:#fff;}
#system-template-list>div{background-color:#fff;margin:10px auto;padding:0;}
#system-template-list>div>.style-list{margin:0;}
/* 【【【【【【我的文章】】】】】】 */
#syncToWechat {
    background: #ff793f;
    border: 0;
    border-radius: 0;
}
#syncToWechat~a{
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0;
    color:#999;
}
#syncToWechat~a:hover{border-color: #ff793f;}
#SearchWxMsgName{border-radius:12px 0 0 12px;background-color: #ecedee;}
#SearchWxMsgName::placeholder{color: #999;}
#wxmsg-mine-cateid {
    border: 1px solid #dadee3;border-radius: 4px;
    color: #999;
    text-align: center;
}


#left-operate-menu{border-bottom:1px solid transparent;}
/* 【【【【【【编辑框和右侧内容区域】】】】】】 */
.editor2{background-color: inherit;}

/* 【【【【【【右侧取色板】】】】】】 */
#btn-favor-color{top:4px !important;}
#custom-color-text{height: 25px !important;}
.color-swatch {
    width: 18px;
    height: 18px;
    margin: 3px 3px;
    border-radius:3px;
}
/* 【【【【【【右侧功能按钮】】】】】】 */
.editorslide .btn {
    width: 100%;
    text-align: center;
    padding: 5px 0;
    color: #555;
    font-size: 15px;
    border: 0;
    background: #f9f9f9;
    border-radius: 0 10px 10px 0;
    box-shadow:none;
}
.editorslide .btn-default:hover {background: rgb(58,51,50);border: 0;}
.zeroclipboard-is-hover:{background: rgb(58,51,50) !important;border: 0;}
/* 【【【【【【右侧内容区域】】】】】】 */
.list-group-item {border-bottom: 1px dashed #ddd !important;}
#right-pannel .nav-tabs{border-bottom:0;}
#right-pannel .list-group .list-group-item{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
#right-pannel .list-group .list-group-item a{color:#333;}
#right-pannel .list-group .list-group-item a:hover{color:#ff793f;}
/* 【【【【【【编辑器底部按钮】】】】】】 */
.edui-default .edui-editor-bottomContainer,.edui-default .edui-editor-bottomContainer td{height:30px !important;line-height: 30px !important;padding-left:3px;}

/* 【【【【【【页码】】】】】】 */
.ui-page-default:hover{color: #ff793f;}
/*【【【【【【编辑器弹窗】】】】】】*/
.edui-dialog-foot, .edui-dialog-titlebar {background: #fff !important;border: 0 !important;}
.edui-default .edui-dialog-foot{padding:0;}
.edui-default .edui-dialog-buttons {position: initial;}
.edui-default .edui-dialog-buttons .edui-button .edui-button-body {
    border: 1px solid #ccc;
    color: #999;
    border-radius: 5px;
}
.edui-default .edui-dialog-buttons .edui-okbutton .edui-button-body {
    background-color: #ff814a;
    border-radius: 5px;
    color:#fff;
}
.edui-default .edui-dialog-buttons .edui-okbutton .edui-state-hover .edui-button-body {
    background-color: #fd6a2a;
}
.edui-default .edui-dialog-body{border-radius:10px;overflow:hidden;}
.editorBox{margin-left:60px;}
#right-pannel{width:40px;position:fixed;height:100%;top:38px;right:0;background: transparent;z-index: 0;overflow: hidden;padding-left: 40px;}
.open-side #right-pannel{width:320px;}
#full-page,#nav-header {min-width:960px;max-width: 1350px;position:relative !important;width:100%;margin: 0 auto;}
.fullscreen #full-page {min-width:700px;width:700px;}
.full-screen #full-page,.full-screen #nav-header{max-width: 1635px;}
@media (max-width: 1536px) {
    .open-side .editorBox{margin-left: 10px;}
    .open-side #color-plan {right: -200px !important;}
}
@media (max-width: 1420px) {
    #full-page{max-width: 1215px;margin:0 auto !important;}
    /* #nav-header{padding-left:80px;} */
    #left-logo,.w1{width:90px !important;}
    .w2{width:368px;}#top-style-tools{width:364px;}#styleSearchResult{width:368px !important;}
    .editorBox{margin-left:5px;width:435px;} .editorslide li{width:80px;}
    .nav-toolbars > li > a{padding: 5px 0px;}
    .nav-toolbars .open >a,.nav-toolbars .open >a:hover,.nav-toolbars .open >a:focus,.nav-toolbars > li > a.active,.nav-toolbars > li > a:hover,.nav-toolbars > li > a:focus{border:0 none !important;background:rgba(215,215,215,0.9);padding: 5px 0px;color:#ff8124 !important;opacity:1;}
    .edui-default .edui-toolbar .edui-button .edui-icon, .edui-default .edui-toolbar .edui-menubutton .edui-icon, .edui-default .edui-toolbar .edui-splitbutton .edui-icon{height: 18px!important;width: 18px!important;}
    .edui-default .edui-toolbar .edui-button, .edui-default .edui-toolbar .edui-splitbutton, .edui-default .edui-toolbar .edui-menubutton, .edui-default .edui-toolbar .edui-combox {  margin: 1px 0px !important;}
    #color-plan {right: -185px !important;}
    #right-pannel{padding-left:0 !important; width:32px;} .open-side #right-pannel{width:280px;}
    #right-panel-close { width: 32px !important;left: auto !important;right:0;}
    #right-panel-nav{display:none;width: 248px !important;top:0 !important;left: auto !important;right:32px;height:32px;}
    #right-panel-nav li a{padding: 5px 20px !important;display:inline-block;}
    #right-panel-content{display:none;margin-top:32px;}
    #right-pannel .nav-tabs .nav-item{display: inline-block;}
    .open-side #right-panel-nav,.open-side #right-panel-content{ display:block !important;}
    .hide-side .editorBox{width:500px;margin-left: 50px;}
    .hide-side #color-plan {right: -200px !important;}
    .hide-side #full-page{max-width: 1210px;margin: 0 auto !important;}
}
@media (max-width: 1180px) {
    #full-page{margin:0 0 !important;}
	/* #nav-header{padding-left:80px;} */
	#left-logo,.w1{width:80px !important;}
	.w2{width:324px;border-right: 1px solid #ccc;}#top-style-tools{width:265px;}
    #styleSearchResult{width:324px !important;}
	.nav-toolbars > li > a{padding: 5px 0px;}
	.nav-toolbars .open >a,.nav-toolbars .open >a:hover,.nav-toolbars .open >a:focus,.nav-toolbars > li > a.active,.nav-toolbars > li > a:hover,.nav-toolbars > li > a:focus{border:0 none !important;background:rgba(215,215,215,0.9);padding: 5px 0px;color:#ff8124 !important;opacity:1;}
	.edui-default .edui-toolbar .edui-button .edui-icon, .edui-default .edui-toolbar .edui-menubutton .edui-icon, .edui-default .edui-toolbar .edui-splitbutton .edui-icon{height: 18px!important;width: 17px!important;}
    .edui-default .edui-toolbar .edui-button, .edui-default .edui-toolbar .edui-splitbutton, .edui-default .edui-toolbar .edui-menubutton, .edui-default .edui-toolbar .edui-combox {  margin: 1px 0px !important;}
    .hide-side .editorBox{margin-left:5px;width:425px;}
    .hide-side #color-plan {right: -185px !important;}
    #right-pannel{display: none;}
}

a#link-127 {
    display: none;
}

.fullscreen .editor1 ,.fullscreen #left-logo,.fullscreen .w1,.fullscreen #color-plan,.fullscreen #right-pannel{display:none !important;}

#top-style-tools label{margin:0;}
#favtype {margin-right: 2px;}
#favtype .btn-secondary{background: transparent;opacity: 0.8;border: 1px solid #ddd;padding: 2px 10px;color: #333;margin: 0;}
#favtype .btn-secondary:hover{color:#333;}
#favtype .btn-secondary.active{background: rgba(0,0,0,0.4);box-shadow: none;opacity: 1;color:#FFF;}

.jGrowl.bottom-right{bottom:36px;}
.class_qidian_wpa{margin-top:3px;float: left;margin-right: 5px;}
#cuxiaomsg .modal-dialog{width: 355px;max-width: 355px;}
.otf-poptools{width:auto;min-width:320px;top:0 !important;}
.otf-poptools span{margin:0 5px;cursor:pointer;}
.otf-poptools .colors{height:24px;}
.otf-poptools section{white-space: nowrap;width: auto;}



#right-pannel .nav-tabs .nav-item{margin-bottom:0;border-bottom: 1px solid #ddd;}
#right-pannel .fa-remove,#right-pannel .fa-angle-double-left{display: block;line-height: 32px;cursor: pointer;}
#right-pannel .card{border:0 none;border-radius:0;}
#right-pannel .card-header{padding: 0.2rem 1.25rem;border:0 none;}
#right-pannel .card-body{padding: 0;overflow-x: hidden;overflow-y: auto;}
#right-pannel .list-group-item{border:0 none;padding: 5px 1rem;margin-bottom:0;border-bottom: 1px solid #f8f8f8;font-size: 14px;background: #FFF;}
#right-pannel ul.nav-tabs{position: absolute; top:32px;left:0px;width: 40px;background: #FFF;}
#right-pannel ul.nav-tabs li a {padding:10px 5px;text-align: center;background: #f4f4f4;}
#right-pannel ul.nav-tabs li a.active{background: #FFF;border: 0 none !important;color:#fc7a2c;}
#right-pannel .tab-content,#right-pannel .tab-content .tab-pane{height:100%;    overflow-y: auto;background: #FFF;}
#right-pannel .rpadv-close{position:absolute;padding:0 10px;line-height:32px;top:0;right:0;color:#333;font-size: 24px;cursor: default;}
.style-center{margin-left: 0 !important;flex-direction: row;}
.logo-box{width: auto}
.style-nav-item{display: flex;align-items: center;font-size: 14px;color: #afb3b6;margin-right: 20px;}
.style-nav-item a {color: #fff}
.sys-box #cateCheckedUpfile{display: none !important}
#editor-msg-list .uploadfile-toolbar-x,.single-checkbox-obb,.appmsg_opr a.opr-link,#my-file-list .openCatebox{display: none !important;}
#nav-header .nav>li {height: auto}
</style>
<div class="bg-header">
		<div id="nav-header">
		  <div class="clearfix" style="">
			<div class="logo-box" style="">
			  <a href="#" id="left-logo" style=""><img src="https://bdn.135editor.com/files/201812/135whitelogo.png" style="" alt="135微信编辑器"></a>
			</div>
			<label id="free-style-check" data-toggle="tooltip" data-container="body" data-placement="bottom" title="样式列表中，只显示免费样式" style="color: #FFF;font-size: 12px;margin-top: 16px !important;">
				<input id="recommend-free" type="checkbox" onclick="first_load = true;reloadStyleOperate(1,'');" style="">免费
			  </label>
			<ul class="navbar-nav style-center">
				<li class="nav-item style-nav-item"><a href="/style-center?cate_id%3C=100&amp;order=updated" class="nav-link ui-menu-first" id="link-124" data-id="124" ref="style-center" target="_blank">样式中心</a></li>
				<li class="nav-item style-nav-item"><a href="/template-center?cate_id=100&amp;pagesize=12" class="nav-link" id="link-125" data-id="125" ref="template-center" target="_blank">模板中心</a></li>
			</ul>
			<div class="nav-box" style="">
			  <ul id="login-menus" class="hidden float-right nav  editor-nav" style="height: 51px;">
				<!-- <li class="dropdown">
				  <a href="/shortmessages/mine" style="padding:0px 8px;" target="_blank" class="dropdown-toggle" data-toggle="dropdown" data-container="body" data-placement="bottom" title="站内消息中心">
					<i class="fa fa-bell"></i>
					<span class="user-unread-msgnum">0</span>
				  </a>
				  <div id="user-unreadmsg-list" class="dropdown-menu user-unreadmsg-list" style=""></div>
				</li> -->
				<!-- <style type="text/css">
				  .team-menus-lists { padding: 0 !important; border: 0 none; left: auto; right: 0; }
				  .team-menus-lists .user-team-list { line-height: 32px }
				  .team-menus-lists .user-team-list ul { list-style: none; padding-left: 0; }
				  .team-menus-lists .user-team-list ul li a { overflow: hidden; text-overflow: ellipsis; width: 160px; display: block; padding: 0 15px;font-size: 15px;white-space: nowrap; text-align: right; overflow: hidden;}
				  .team-menus-lists .user-team-list ul li:hover a { background-color: #ff793f; }
				  .team-menus-lists .user-team-list ul li:hover * { color: white; }
				  .team-menus-lists .user-team-list ul li:hover img.team-icon {left: -40px; position: relative;  filter: drop-shadow(#ffffff 40px 0); }
				  .team-menus-lists .user-team-list ul li img.team-icon { max-width: 100%; float: left; margin-top: 10px; margin-right: 7px; }
				  .team-menus-lists .user-team-list ul li strong.team-name { font-size: 14px; color: #2d2e3d; display: block; width: 90px; margin-left: 40px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
				  .team-menus-lists .user-team-list ul li span.team-type { margin-top: -10px; font-size: 12px; color: #999; display: block; float: right; width: 90px; text-align: left; }
				</style> -->
				<!-- <li class="dropdown">
				  <a href="/teams/aseets" style="color: #ff7c2c; overflow: hidden; text-overflow: ellipsis;" title="团队协作" id="cur-team-name" target="_blank" class="dropdown-toggle" data-toggle="dropdown" data-container="body" data-placement="bottom">团队协作</a>
					<div class="dropdown-menu text-center team-menus-lists" style ="padding: 0 !important; border: 0 none; left: auto; right: 0;">
					  <div class="user-team-list" style="line-height: 32px"></div>
					</div>
				</li> -->
				<li class="dropdown">
				  <a href="/users/permission" id="vip-user-icon" style="" target="_blank" title="标准会员,点击查看权限">
					<img style="width: 15px;" src="/img/icons/vip.png">
				  </a>
				  <a href="/users/index" title="查看个人中心" class="dropdown-toggle" target="_blank" style="display: inline-block; margin-left: 5px; padding-left: 10px; padding-bottom: 0px; padding-top: 0px;" data-toggle="dropdown"><span id="login-user-name"></span></a>				  <div id="user-operate-menu" class="dropdown-menu" style="">
					<div style="display:block;width:100%;text-align: left;border-bottom: 1px solid #eee;padding-bottom: 5px;margin-bottom: 5px;">
					  <a href="/users/index" target="_blank">您的用户编号：<span id="login-user-id"></span></a></div>
					<!-- <div style="width:120px;display:inline-block;text-align:left;vertical-align: top;">
					  <ul>
						<li><a href="/wxes/mine" target="_blank"><i class="fa fa-wechat"></i> 授权公众号</a></li>
						<li><a href="/wx_timing_broads/mine" target="_blank"><i class="fa fa-clock-o"></i> 定时群发</a></li>
						<li><a href="/wx_activities/mine" target="_blank"><i class="fa fa-university"></i> 微活动</a></li>
						<li><a href="/signatures/mine" target="_blank"><i class="fa fa-pencil"></i> 签名设置</a></li>
						<li><a href="/users/permission" target="_blank"><i class="fa fa-lock"></i> 会员权限</a></li>
						<li><a href="/promots/mine" target="_blank"><i class="fa fa-money"></i> 分销收益</a></li>
						<li><a href="/user_settings/setting" target="_blank"><i class="fa fa-photo"></i> 水印设置</a></li>
					  </ul>
					</div> -->
					<div style="width:100px;display:inline-block;text-align:left;vertical-align: top;">
					  <ul>
						<!-- <li><a href="/orders/mine" target="_blank"><i class="fa fa-shopping-cart"></i> 我的订单</a></li>
						<li><a href="/order_invoices/mine" target="_blank"><i class="fa fa-lock"></i> 申请发票</a></li>
						<li><a href="/users/edit" target="_blank"><i class="fa fa-user"></i> 个人资料</a></li>
						<li><a href="/users/editpassword" target="_blank"><i class="fa fa-cog"></i> 修改密码</a></li>
						<li><a href="http://www.135plat.com/users/activeVip" target="_blank"><i class="fa fa-diamond"></i> 会员兑换</a></li>
						<li><a href="/users/invite" target="_blank"><i class="fa fa-user"></i> 邀请好友</a></li> -->
						<li><a href="/users/logout?stop=1&top=1" title="退出登录" onclick="clearUserCookie();"><i class="fa fa-sign-out"></i> 退出登录</a></li>
					  </ul>
					</div>
				  </div>
				</li>
			  </ul>
			  <ul id="login-links" class="fr nav editor-nav">
				<!-- <li class="dropdown">
				  <a href="/shortmessages/mine" style="padding:0px 8px;" target="_blank" class="dropdown-toggle" data-toggle="dropdown" data-container="body" data-placement="bottom" title="站内消息中心"><i class="fa fa-bell"></i><span class="user-unread-msgnum">0</span></a>
				  <div id="user-unreadmsg-list" class="dropdown-menu user-unreadmsg-list" style="right: 0px;left: auto;padding: 15px;text-align:left;width: 280px;line-height: 28px;">
				  </div>
				</li>
				<li><a href="//www.135editor.com/books/chapter/1/232" target="_blank" style="padding:0;"><img style="vertical-align: middle;" src="https://bdn.135editor.com/files/users/0/1/201808/VKNLCgxk_tvE5.png"></a></li> -->
				<li>
				  <a href="/users/login" id="login-link" onclick="return checkLogin({query:'state=postmsg&type=html'});">登录</a>
				</li>
				<li>
				  <a href="/users/register" id="register-link" target="_blank">注册</a>
				</li>
			  </ul>
			</div>
			<!-- <nav class="navbar navbar-dark">
			  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			  </button>
			</nav>  -->
		  </div>
		</div>
	  </div>
<div id="full-page">
    <div class="box p-r clearfix" style="margin:0 auto;"><!--box start-->

      <div class="w0 p-r clearfix">
        <div class="d-flex">
      	<div class="w1"  style="filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4c000000,endColorstr=#4c000000);height:900px;text-align:center;">
	          <ul class="nav nav-tabs n1-1" id="left-operate-menu" style="height: auto;">
	          		<li class="nav-item"><a href="#editor-template" onclick="$('.editor-template-list .style-item').fadeIn('slow');" data-page="2" class="nav-link filter active" data-filter="all" role="tab" data-toggle="tab">样式</a></li>
	          		<li class="nav-item"><a class="nav-link" href="#parse-rule-lists" data-refresh="always" data-url="/html_parsers/lists #html-parsers-list" role="tab" data-toggle="tab">一键排版</a></li>
					<li class="nav-item" id="tab-tpl-trigger"><a class="nav-link" href="#editor-tpls" role="tab" data-toggle="tab">模板</a></li>
					<li class="nav-item"><a class="nav-link" href="#image-list" onclick="$('#editor-image-navtab  a:first').trigger('click').tab('show');" role="tab" data-toggle="tab">图片素材</a></li>
					<li class="nav-item" id="tab-wxmsg-trigger"><a class="nav-link" href="#editor-my-msgs" data-step="5" data-position='right' data-intro="点击“我的文章”查看保存后的文章" title="点击“我的文章”查看保存后的文章" role="tab" data-toggle="tab">我的文章</a></li>
	          </ul>
	    </div>
      	<div id="style-operate-area" class="clearfix" style="flex: 1;">
                        <div class="d-flex">
	        <div class="w2" style="position:relative;">
	        	<div style="margin: 0 0px;">
		          	<div id="styleSearchResult" style="position:absolute;display:none;top:100px;left:0px;width:384px;z-index: 9998;border: 5px solid rgba(239, 112, 96, 0.6);background:#FFF;z-index: 1111;">
		          		<span title="关闭" class="btn" style="float:right;font-size: 24px;color: #999;font-weight: bold;text-shadow: 0 1px 0 #ffffff;" onclick="$('#styleSearchResult').hide();"> × </span>
		          		<h3 style="border-bottom:2px solid #CCC;margin:0;padding:15px 10px"> 搜索结果 </h3>
		          		<div id="styleSearchResultList" style="height:500px;width:100%;padding:10px;overflow-y:auto;">
		          			<img src="//by.135editor.com/img/ajax/circle_ball.gif">
		          		</div>
		          	</div>
		          	<div id="styleRecentResult" style="position:absolute;display:none;top:100px;left:0px;width:384px;z-index: 10000;border: 5px solid rgba(239, 112, 96, 0.6);background:#FFF;">
		          		<span title="关闭" class="btn" style="float:right;font-size: 24px;color: #999;font-weight: bold;text-shadow: 0 1px 0 #ffffff;" onclick="$('#styleRecentResult').hide();"> × </span>
		          		<h3 style="border-bottom:2px solid #CCC;margin:0;padding:15px 10px"> 最近使用 </h3>
		          		<div id="styleRecentList" style="height:500px;width:100%;padding:10px;overflow-y:auto;">
		          			<img src="//by.135editor.com/img/ajax/circle_ball.gif">
		          		</div>
		          	</div>
	          	</div>

	          <div id="insert-style-list" class="tab-content" style="height:900px;overflow-y:auto;">

	          	<div id="editor-template" data-step="1" data-position="right" data-intro="样式展示区，点击对应的样式可以将样式插入到编辑区域使用。" class="tab-pane active">
	          		<div id="style-categories" style="background-color:rgba(245,245,245,0.9);text-align:center;font-size:14px;">
	          			<div style="height:36px;line-height:36px;">

		          		<ul class="nav nav-tabs nav-toolbars">
							<li class="dropdown">
								<a class="filter" data-filter=".tagtpl-107,.tagtpl-229,.tagtpl-237,.tagtpl-233,.tagtpl-232,.tagtpl-284" role="tab" data-toggle="tab"> 标题 </a>
								<ul class="dropdown-menu">
		<li><a class="filter" data-filter=".tagtpl-229" >编号标题</a></li>
		<li><a class="filter" data-filter=".tagtpl-237" >框线标题</a></li>
		<li><a class="filter" data-filter=".tagtpl-233" >底色标题</a></li>
		<li><a class="filter" data-filter=".tagtpl-232" >图片标题</a></li>
		<li><a class="filter" data-filter=".tagtpl-284" >纯序号</a></li>
        <li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
								</ul>
							</li>
							<li style="width:1px">|</li>
							<li class="nav-item dropdown">
								<a class="filter" data-filter=".tagtpl-109,.tagtpl-1089,.tagtpl-238,.tagtpl-226,.tagtpl-228,.tagtpl-230,.tagtpl-231,.tagtpl-235" role="tab" data-toggle="tab"> 正文 </a>
								<ul class="dropdown-menu">
		<li><a class="filter" data-filter=".tagtpl-1089">引用</a></li>
		<li><a class="filter" data-filter=".tagtpl-238">段落文字</a></li>
		<li><a class="filter" data-filter=".tagtpl-226">边框内容</a></li>
		<li><a class="filter" data-filter=".tagtpl-228">底色内容</a></li>
		<li><a class="filter" data-filter=".tagtpl-230">序号/轴线</a></li>
		<li><a class="filter" data-filter=".tagtpl-231">单页</a></li>
		<li><a class="filter" data-filter=".tagtpl-235">竖排</a></li>
        <li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
								</ul>
							</li>
                            <li style="width:1px">|</li>
							<li class="dropdown">
								<a class="filter" data-filter=".cate-53,.cate-56,.tagtpl-261,.tagtpl-262,.tagtpl-811,.tagtpl-263,.tagtpl-939" role="tab" data-toggle="tab"> 引导 </a>
								<ul class="dropdown-menu">
		<li><a class="filter" data-filter=".tagtpl-264">分割线</a></li>
		<li><a class="filter" data-filter=".tagtpl-261">引导关注</a></li>
		<li><a class="filter" data-filter=".tagtpl-262">引导阅读原文</a></li>
		<li><a class="filter" data-filter=".tagtpl-811">引导分享</a></li>
		<li><a class="filter" data-filter=".tagtpl-263">引导赞</a></li>
		<li><a class="filter" data-filter=".tagtpl-939">二维码</a></li>
        <li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
								</ul>
							</li>
                            <li style="width:1px">|</li>
							<li class="dropdown">
								<a class="filter" data-filter=".tagtpl-151,.tagtpl-111,.tagtpl-222,.tagtpl-223,.tagtpl-224,.tagtpl-225,.tagtpl-234,.tagtpl-236,.tagtpl-239,.tagtpl-240,.tagtpl-241,.tagtpl-242" role="tab" data-toggle="tab"> 图文 </a>
								<ul class="dropdown-menu">
		<li><a class="filter" data-filter=".tagtpl-222">图片样式</a></li>
		<li><a class="filter" data-filter=".tagtpl-223">上下图文</a></li>
		<li><a class="filter" data-filter=".tagtpl-224">左右图文</a></li>
		<li><a class="filter" data-filter=".tagtpl-239">单图</a></li>
		<li><a class="filter" data-filter=".tagtpl-240">双图</a></li>
		<li><a class="filter" data-filter=".tagtpl-241">三图</a></li>
		<li><a class="filter" data-filter=".tagtpl-242">三个以上</a></li>
		<li><a class="filter" data-filter=".tagtpl-225">背景/信纸</a></li>
		<li><a class="filter" data-filter=".tagtpl-234">音频/视频</a></li>
		<li><a class="filter" data-filter=".tagtpl-236">对话</a></li>
        <li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
								</ul>
							</li>
                            <li style="width:1px">|</li>
							<li class="dropdown">
								<a class="filter" data-filter=".tagtpl-227,.tagtpl-702,.tagtpl-292" role="tab" data-toggle="tab"> 布局 </a>
								<ul class="dropdown-menu" style="right: 0;left: auto;text-align:right;">

		<li><a class="filter" data-filter=".tagtpl-702">左右留白</a></li>
		<li><a class="filter" data-filter=".tagtpl-292">表格样式</a></li>
        <li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
								</ul>
							</li>
                            <li style="width:1px">|</li>
							<li class="dropdown" style="width:22%;">
								<a class="filter" data-filter=".tagtpl-255,.tagtpl-244,.tagtpl-256,.tagtpl-297,.tagtpl-940,.tagtpl-257,.tagtpl-234,.tagtpl-857,.tagtpl-878" role="tab" data-toggle="tab"> 节日行业</a>
								<ul class="dropdown-menu" style="right: 0;left: auto;text-align:right;">
		<li><a class="filter" data-filter=".tagtpl-297">教育</a></li>
		<li><a class="filter" data-filter=".tagtpl-940">活动</a></li>
		<li><a class="filter" data-filter=".tagtpl-257">电商</a></li>
		<li><a class="filter" data-filter=".tagtpl-234">视听</a></li>
		<li><a class="filter" data-filter=".tagtpl-857">医疗</a></li>
		<li><a class="filter" data-filter=".tagtpl-878">母婴</a></li>
		<li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
								</ul>
							</li>

						</ul>

						</div>
						<div style="width:100%;text-align:left;height:40px;padding:5px;background:#FFF;color: #666;position:relative;">
							<i class="fa fa-search" style="position:absolute;top:12px;left:14px;"></i>
		          			<input type="text" placeholder="输入关键字搜索样式" style="height:28px;width:120px;font-size: 14px;color:#666;background-color: transparent; border: 1px solid #ddd;padding:0 10px 0 30px;" id="txtStyleSearch">
		          			<small id="style-sorts" style="font-size: 14px;">
                                                                排序：<span title="按收藏时间先后排序"  class="sort active" id="sort-time" onclick="first_load = true;$('#sort-time').addClass('active');$('#sort-click').removeClass('active');$('#favtype .btn-secondary').removeClass('active');$('#favtype .btn-secondary:eq(1)').addClass('active');reloadStyleOperate(1);" style="cursor:pointer;" data-sort="favor:desc" > <i class="fa fa-clock-o"></i> 收藏 </span><span style="color:#ccc;"> · </span>
		          					   <span title="按使用次数从多到少排序" class="sort" id="sort-click" style="cursor:pointer;" onclick="first_load = true;$('#sort-click').addClass('active');$('#sort-time').removeClass('active');$('#favtype .btn-secondary').removeClass('active');$('#favtype .btn-secondary:eq(1)').addClass('active');reloadStyleOperate(1);" data-sort="click_nums:desc" > <i class="fa fa-sort-amount-desc"></i> 次数 </span><span style="color:#ccc;"> · </span>
                                		          					   <span id="last-used"  title="查看最近使用的样式" style="cursor:pointer;" > <i class="fa fa-magic"></i> 最近 </span>
		          			</small>
		          		</div>
                        <div class="more-filter" style="width:100%;text-align:left;height:28px;padding:0 5px 5px;background:#FFF;color: #666;position:relative;font-size:13px;display:flex;align-items: baseline;">
                            <div id="favtype" class="btn-group btn-group-toggle" data-toggle="buttons">

  <label class="btn btn-xs btn-secondary active">
    <input type="radio" name="favtype" value="recommend" id="option-recommend" checked autocomplete="off"> 推荐
  </label>
    <label class="btn btn-xs btn-secondary">
    <input type="radio" name="favtype" value="fav" id="option-fav" autocomplete="off"> 收藏
  </label>
    <label class="btn btn-xs btn-secondary">
    <input type="radio" name="favtype" value="new" id="option-new" checked autocomplete="off"> 最新
  </label>
</div>
                            <a class="filter" style="color: #ff8124;font-size:15px;" data-filter=".tagtpl-243">简约</a>
                            <a class="filter" style="color: #ff8124;font-size:15px;" data-filter=".tagtpl-297">教育</a>
                            <a class="filter" data-filter=".tagtpl-1312">婚庆</a>
                            <a class="filter" data-filter=".tagtpl-1144">旅游</a>
                            <a class="filter" data-filter=".tagtpl-1261">餐饮</a>
                            <a class="filter" data-filter=".tagtpl-225">背景</a>
                            <div class="dropdown" style="display:inline-block;">
                              <a role="tab" data-toggle="tab">更多</a>
                              <ul class="dropdown-menu" style="right: 0;margin-top: -2px;left: auto;text-align:right;font-size: 12px;min-width: 100px;">
                                <li><a class="filter" data-filter=".tagtpl-286">动态</a></li>

                                <li><a class="filter" data-filter=".tagtpl-259">时尚</a></li>
                                <li><a class="filter" data-filter=".tagtpl-1151">滑动</a></li>
                                <li><a class="filter" data-filter=".tagtpl-258">怀旧</a></li>
                                <li><a class="filter" data-filter=".tagtpl-1152">古典</a></li>
                                <li><a class="filter" data-filter=".tagtpl-1153">可爱</a></li>
                                <li><a class="filter" data-filter=".tagtpl-1166">撕纸</a></li>
                                <li><a href="//www.135editor.com/style-center?cate_id%3C=100&order=updated" target="_blank">更多样式</a></li>
                              </ul>
                            </div>
                        </div>
						<!--<div id="style-sorts" style="text-align:right;height:26px;padding:5px 10px;z-index:1;background-color:rgba(235,235,235,0.8);">
		          		</div>-->
		          	</div>
		          	<div id="editor-template-scroll" style="height:730px;overflow-y: auto;overflow-x:hidden;position:relative;border-top: 2px solid #ddd;">

		          		<div id="load-more-style" class="alert alert-warning m-0 p-0"></div>
		          		<div style="margin:20px;color:#7f7f7f;">
			<p>135编辑器是最好用的微信排版工具。</p>
			<p>135编辑器提供三种排版方式，插入排版，秒刷排版，一键排版。排版，就是这么简单。</p>

							<hr/>
			<p class="text-danger">如果您打开编辑器显示异常，可尝试访问:<br/><a target="_blank" href="https://static.135editor.com">备用网址1</a>，<a target="_blank" href="https://by.135editor.com">备用网址2</a>，<a target="_blank" href="http://allcdn.135editor.com">备用网址3</a>。</p>
							<hr/>
			<p>135编辑器支持收藏样式、收藏颜色、图片素材编辑，图片水印等个性化功能。</p>
			<p style="color:#7f7f7f;">135微信编辑器，是最易用的微信排版工具，有样式丰富，“秒刷”一键排版，轻松编辑赏心悦目的微信图文素材。</p>
						</div>
					</div><!-- end with editor-template-scroll 样式列表 -->
					</div>
					<div id="image-list" class="tab-pane"  style="padding:0 10px;">
						<div style="padding:10px 0;">
					  		<!-- <button onclick="edit_image();" class="btn btn-primary">美图上传</button>  -->
							<button onclick="meitu_upload();" class="btn btn-primary btn-xs">美图上传</button>
					  		<button onclick="pingtu_upload();" class="btn btn-primary btn-xs">简易拼图</button>

					  		<a href="http://soogif.com/" target="_blank" class="btn btn-primary btn-xs">SOOGIF动图</a>

                            <a href="http://vpeitu.com" target="_blank" class="btn btn-primary btn-xs">微配图</a>
					  	</div>

							<ul id="editor-image-navtab" class="nav nav-tabs" style="border:0 none;text-align:center;">
                                							  <li class="nav-item ignore"  style="padding:0 0;"><a class="nav-link active" style="padding:5px 0px;" data-url="/uploadfiles/mine?fieldname=upload&inajax=1 #my-file-list" data-refresh="always" href="#upload-image-list-li" role="tab" data-toggle="tab">我的上传</a></li> 							  <!-- <li class="ignore col-sm-3  active"  style="padding:0 0;"><a style="padding:5px 5px;" data-url="/editor_styles/favimages?inajax=1" href="#favor-image-li" role="tab" data-toggle="tab">收藏图片</a></li> -->
							  <li class="nav-item ignore"  style="padding:0 0;"><a class="nav-link" style="padding:5px 0px;" data-url="/images/lists?type=images&inajax=1 #tmp-lists" href="#allimage-list-li" role="tab" data-toggle="tab">图库</a></li>
							  <li class="nav-item ignore"  style="padding:0 0;"><a class="nav-link" style="padding:5px 0px;" data-url="/images/lists?cate_id=85&inajax=1 #tmp-lists" href="#expression-list-li" role="tab" data-toggle="tab">表情</a></li>
							  <li class="nav-item ignore"  style="padding:0 0;"><a class="nav-link" style="padding:5px 0px;" data-url="/images/lists?cate_id=84&inajax=1 #tmp-lists" href="#icon-list-li" role="tab" data-toggle="tab">图标</a></li>
							  <li class="nav-item ignore"  style="padding:0 0;"><a class="nav-link" style="padding:5px 0px;" data-url="/soogifs/clist?type=left&cate_id=132&inajax=1 #tmp-lists" href="#soogif-list-li" role="tab" data-toggle="tab">动图</a></li>
                              <!-- <li class="nav-item ignore"  style="padding:0 0;"><a class="nav-link" style="padding:5px 5px;" data-url="/images/tuchong?inajax=1 #legal-image-list" href="#legal-list-li" role="tab" data-toggle="tab">正版图</a></li>
							  <li class="ignore"  style="padding:0 0;"><a style="padding:5px 8px;" data-url="/editor_styles/imglist?inajax=1&cate_id=53 #system-img-list" href="#split-image-list-li" role="tab" data-toggle="tab">分割线</a></li>
							  <li class="ignore"  style="padding:0 0;"><a style="padding:5px 8px;" data-url="/editor_styles/imglist?inajax=1&cate_id=56 #system-img-list" href="#guide-image-list-li" role="tab" data-toggle="tab">引导图</a></li> -->
							</ul>
							<div class="tab-content"  style="padding:10px 0;overflow-x:hidden;" id="editor-image-list">
                                <div id="upload-image-list-li" class="tab-pane active  clearfix" style="padding: 0;position: relative;"></div>
								<div id="favor-image-li" class="tab-pane clearfix" style="position: relative;"></div>
								<div id="split-image-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
								<div id="guide-image-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
								<div id="allimage-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
								<div id="expression-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
								<div id="icon-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
								<div id="soogif-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
                                <div id="legal-list-li" class="tab-pane  clearfix" style="padding: 0;position: relative;"></div>
							</div>
					</div>

					<div class="tab-pane" id="editor-tpls" style="padding: 10px 10px;position:relative;">
					    	<ul id="editor-tpls-navtab" class="nav nav-tabs" style="border:0 none;">
                              <li class="nav-item ignore  col-sm-4">
                                <a class="nav-link active" href="#recommend-tpl-list-1" data-url="/editor_styles/systemTemplates"  role="tab" data-toggle="tab">系统模板</a>
                              </li>
                              							  <li class="nav-item ignore col-sm-4" id="favorite-tpl-list-li"><a class="nav-link" href="#favorite-tpl-list-1" data-refresh="always" data-url="/editor_styles/favorTemplates" role="tab" data-toggle="tab">收藏模板</a></li>
                              <li class="nav-item ignore col-sm-4" id="personal-tpl-list-li"><a class="nav-link" href="#personal-tpl-list-1" data-refresh="always" data-url="/user_styles/myStyles" role="tab" data-toggle="tab">个人模板</a></li>
                              							</ul>
							<div class="tab-content"  style="padding:0px;overflow-x:hidden;" id="tpl-tab-content">
                                <div id="recommend-tpl-list-1" class="tab-pane active"></div>
								<div id="favorite-tpl-list-1" class="tab-pane"></div>
								<div id="personal-tpl-list-1" class="tab-pane"></div>
							</div>
					  </div>
					  <div class="tab-pane" style="padding:10px;background-color:#f4f4f4;height:100%;" id="editor-others">
                        <p style="margin-bottom:10px">
                            <a href="http://www.yunyingzhinan.com/" target="_blank" class="btn"  style="width: 100%;background-color: #fff;color: #373737;font-size:14px;"><i class="fa fa-group" style="color:#ff793f;"></i> 认证号涨粉神器</a>
                        </p>

                        <p style="width: 99px;display:inline-block;height:100px;background-color:#fff;padding:10px 15px;text-align:center;">
                            <i class="fa fa-money" style="color:#ff793f;font-size:30px;"></i><br/>
                            <a href="/wx_activities/add?model=Baoming" title="收费直接进自己的微信商户" target="_blank"  style="color:#373737;font-size:14px;">报名收费</a>

                            <a href="https://www.135plat.com/wx_activities/view/1690" target="_blank"  style="color:#999;font-size:12px;">查看样例</a>
                        </p>

					  	<p style="margin:10px 15px;width: 99px;display:inline-block;height:100px;background-color:#fff;padding:10px 15px;text-align:center;">
                            <i class="fa fa-book" style="color:#ff793f;font-size:30px;"></i><br/>
					  		<a href="/wx_activities/add?model=Qa" target="_blank" style="color:#373737;font-size:14px;">收集提议</a>
					  		<a href="https://www.135plat.com/wx_activities/view/302" target="_blank" style="color:#999;font-size:12px;">查看样例</a>
					  	</p>

					  	    <p style="width: 99px;display:inline-block;height:100px;background-color:#fff;padding:10px 15px;text-align:center;">
                            <i class="fa fa-bar-chart" style="color:#ff793f;font-size:30px;"></i><br/>
					  	<a href="/questionnaires/add" target="_blank" style="color:#373737;font-size:14px;">数据表单</a>
					  	<a href="https://www.135plat.com/questionnaires/form/925/4" target="_blank" style="color:#999;font-size:12px;">查看样例</a>
					  	</p>
                        <div class="row" style="background-color:#fff;padding:10px 0;margin: 10px auto;">
                            <div class="col-sm-12">
                                <p><i class="fa fa-magic" style="color:#ff793f;"></i> &nbsp;&nbsp;字符效果</p>
                                <hr style="margin-top: 5px;">
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert',{'title':'标题下划线','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">标题下划线</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/2',{'title':'字母变成小号的大写字母','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">字母变小号</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/1',{'title':'数字转成上标小数字','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">数字转上标</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/3',{'title':'文字出大汗','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">文字出大汗</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/4',{'title':'文字出小汗','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">文字出小汗</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/5',{'title':'数字转中文','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">数字转中文</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/6',{'title':'字母加圈','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">字母加圈</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/7',{'title':'汉字转拼音','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">汉字转拼音</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/8',{'title':'简体转繁体','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">简体转繁体</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/9',{'title':'标题发芽','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">标题发芽</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/txt_convert/10',{'title':'风一样的标题','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">似风的标题</button>
                            </div>
                            <div class="col-sm-4">
                            <button style="margin-bottom:10px;width:100%;font-size:14px;" onclick="publishController.open_dialog('/tools/text_gradient',{'title':'文字渐变色','id':'title-under-line','hidden':'remove','width':600});" class="btn btn-default">文字渐变色</button>
                            </div>
                        </div>

                        <hr>
                        <p style="margin-bottom:10px;background-color: #fff;">
                            <button style="margin-bottom:2px;width:66.5%;border:0;text-align:left;font-size:14px;" onclick="publishController.open_dialog('/weibos/short_url',{'title':'生成短链接','id':'generate-short-url','hidden':'remove','width':600});" class="btn btn-default"><i class="fa fa-link" style="color:#ff793f;"></i> 生成短链接</button>
                            <a href="//www.135editor.com/books/chapter/1/159" style="color:#999;" target="_blank" class="btn"><i class="fa fa-question-circle"></i> 使用教程</a>
                        </p>
                        <p style="margin-bottom:10px;background-color: #fff;">
                            <button id="btn-choose-frag" style="margin-bottom:2px;width:66.5%;border:0;text-align:left;font-size:14px;" class="btn btn-default"><i class="fa fa-calendar" style="color:#ff793f;"></i> 每日一句</button>
                            <a href="//www.135editor.com/books/chapter/1/20" style="color:#999;" target="_blank" class="btn"><i class="fa fa-question-circle"></i> 使用教程</a>
                        </p>
                        <p style="margin-bottom:10px;background-color: #fff;">
                            <a href="/wechatface.html" style="width:66.5%;border:0;text-align:left;font-size:14px;" target="_blank" class="btn btn-default"><i class="fa fa-weixin" style="color:#ff793f;"></i> 微信对话生成</a>
                            <a href="//www.135editor.com/books/chapter/1/206" style="color:#999;" target="_blank" class="btn"><i class="fa fa-question-circle"></i> 使用教程</a>
                        </p>

					  </div>
					  <div class="tab-pane" id="parse-rule-lists"></div>


					  <div id="editor-my-msgs" class="tab-pane" style="padding: 10px 10px;position: relative;">


					  	<ul class="nav nav-tabs" style="border:0 none;font-size:14px;color:#333;">
							  <li class="nav-item ignore col-sm-4 active" onclick="return $('#tab-wxmsg-trigger').trigger('click');" style="text-align: center;" ><a class="nav-link active" href="#personal-article-list" role="tab" data-selector="#wxmsg-mine-list" style="padding:10px 0;" data-toggle="tab">135文章</a></li>
							  <li class="nav-item ignore col-sm-4" style="text-align: center;" ><a class="nav-link" href="#wechat-article-list" data-url="/wx_msgs/wechat?pagesize=5 #wechat-msg-mine-list"  data-refresh="always" data-selector="#wxmsg-mine-list" role="tab" data-toggle="tab" style="padding:10px 0;">微信文章</a></li>
							  <li class="nav-item ignore col-sm-4" style="text-align: center;" ><a class="nav-link" href="#article-trash-list" data-url="/wx_msgs/mine?deleted=1 #wxmsg-mine-list" data-refresh="always" data-selector="#wxmsg-mine-list" role="tab" data-toggle="tab" style="padding:10px 0;">回收站</a></li>
						</ul>
							<div class="tab-content"  style="padding:0px;overflow-x:hidden;" id="my-article-list">
								<div id="personal-article-list" class="tab-pane active">
									<div class="m0" style="padding:10px 0 5px; background: transparent; z-index: 1;">
			          					<small>
			          						<p style="clear:none;color:#999;font-size:14px;">您的公众号<a href="//www.135plat.com/wxes/pauth" style="color:red;" target="_blank">授权给135</a>后，可将文章同步保存到微信文章素材库</p>
										</small>
			          				</div>
									<div id="editor-msg-list">
									</div>
								</div>
								<div id="wechat-article-list" class="tab-pane"></div>
								<div id="article-trash-list" class="tab-pane"></div>
							</div>

					  </div>
	          </div>
	        </div>
	      <div class="w3 clearfix" style="position: relative;flex: 1;"><div class="editor2 p-r fl" style="height:900px;"><div id="right-pannel"></div>
          <form action="" class="form-horizontal editorBox" style="background-color:transparent;position: relative;height: 100%;z-index:0;" role="form" target="_blank" id="WxMsgViewForm" method="post" accept-charset="utf-8">
		         <div id="image-preview"></div>
		            <script id="WxMsgContent" type="text/plain"></script>

		            <input type="hidden" name="template_id" id="template_id" />
				<input type="hidden" name="template_name"  id="template_name"/>
                <input type="hidden" id="remoteName"/>
                <input type="hidden" id="remoteSummary"/>
                <input type="hidden" id="remoteCoverimg"/>
				<input type="hidden" name="msg_id" />


            <div class="editorslide"  data-step="3" data-position='left' data-intro="操作按钮区，可以复制内容，保存文章，导入网址内容、预览等，更多功能也可以点开看一看">
              <ul id="operate-callback">
				<li><button type="button" id="third-callback" tabindex="2"  class="btn btn-warning btn-xs" title="完成编辑，将内容返回到调用方">完成编辑</button></li>
				<li><button type="button"  id="btn-new-msg" class="btn btn-default btn-xs" title="清空内容,创建新文档">清空内容</button></li>
				<li><a href="javascript:;" id="preview-editor" class="btn btn-default btn-xs" title="预览实际效果以手机为准">预览效果</a></li>
				<li><button type="button" id="save-as-template" tabindex="2" class="btn btn-default btn-xs" title="保存内容">保存同步</button></li>
                <li><a href="/books/chapter/1/20" target="_blank" class="btn btn-default btn-xs">使用帮助</a></li>

              </ul>
            </div>

<div id="color-plan" style="width:100px;top:100px;position: absolute;" data-step="4" data-position="left" data-intro="配色方案区，可以点击各种颜色来更换样式的颜色。特色功能有些其他功能操作可以根据需要选择使用。" >
	<div class="panel panel-primary" style="border:0 none;background: #2d2e3d;">

	<ul class="nav nav-tabs" role="tablist" id="right-fix-tab">
	  <li class="nav-item" title="<strong>换色操作提示：</strong><br><span style='color:#FF8124'>①</span> 勾选全文换色，对整个编辑器的内容进行换色；<br><span style='color:#FF8124'>②</span> 编辑区域里点击选中样式后，对样式单独换色；<br><span style='color:#FF8124'>③</span> 没有勾选全文换色，也没有选中样式时，对左侧样式列表换色" data-html="true" data-toggle="tooltip" data-container="body" data-placement="left"  role="presentation"><a data-toggle="#color-choosen" href="javascript:;" aria-controls="home">配色方案</a></li>
	</ul>

	<div class="tab-content" style="padding: 5px 5px !important;overflow:hidden;">
		<div id="features" role="tabpanel" class="tab-pane" style="text-align: left;padding-left:5px;">
			<small class="more-popover-content" style="font-size:12px;">
					<button class="btn btn-default btn-xs btn-block" id="set-image-radius"> 图片圆形  </button>
					 <button class="btn btn-default btn-xs btn-block" id="set-image-border"> 图片边框 </button>

						<button class="btn btn-default btn-xs btn-block" id="flat-strip-radius"> 去圆角</button>
						<button class="btn btn-default btn-xs btn-block" id="flat-add-radius"> 加圆角</button>
						<button class="btn btn-default btn-xs btn-block" id="flat-strip-border"> 去边框</button>
						<!--  <button class="btn btn-default btn-xs" id="flat-add-border"> 加边框</button>  -->
						<button class="btn btn-default btn-xs btn-block" id="flat-strip-shadow"> 去阴影 </button>
						<button class="btn btn-default btn-xs btn-block" id="flat-add-shadow"> 加阴影 </button>

						<button class="btn btn-default btn-xs btn-block" id="135-random-color">
						随机换色
						</button>

			</small>
		</div>
			<div role="tabpanel" style="margin:auto;" class="tab-pane active"  id="color-choosen">
			  	 <div style="margin:5px 0px;color:#FFF;line-height:32px;text-align: center;position:relative;" >
		        	<input id="custom-color-text" class="colorPicker form-control" style="font-size:12px;color:#FFF;border: 0 none;border-radius: 5px;padding:4px 8px 4px 25px;height:24px;line-height:16px" id="custom-color" value="#EF7060" />
		        	<i id="btn-favor-color" title="点击新增颜色，最多新增20种" data-toggle="tooltip" data-container="body" data-placement="left"  style="position:absolute;left:5px;color:#FFF;cursor:pointer;top:5px;" class="fa fa-plus-circle"></i>
		        </div>

		        <div style="margin:0 0;color:#dad9d8;line-height:18px;text-align: center;">
		        <label style="cursor:pointer;margin-bottom:0px;font-size: 12px;">
		        	<input style="float:left;" type="checkbox" id="replace-color-all" value="1">&nbsp;全文换色
		        </label>
		        </div>
<div id="color-plan-list" style="overflow-y:auto;width: 115px;padding-top:10px;margin-left:-5px;">
			    <ul class="clearfix" style="list-style:none;padding:0 2px;margin:0 0;">
		            <li class="color-swatch" style="background-color: #ac1d10"></li>
		            <li class="color-swatch" style="background-color: #d82821;"></li>
		            <li class="color-swatch default-color" style="background-color: #ef7060;"></li>
		            <li class="color-swatch" style="background-color: #fde2d8;"></li>

		            <li class="color-swatch" style="background-color: #d32a63;"></li>
		            <li class="color-swatch" style="background-color: #eb6794;"></li>
		            <li class="color-swatch" style="background-color: #f5bdd1;"></li>
		            <li class="color-swatch" style="background-color: #ffebf0;"></li>



		            <li class="color-swatch" style="clear:left;background-color: #e2561b;"></li>
		            <li class="color-swatch" style="background-color: #ff8124;"></li>
		            <li class="color-swatch" style="background-color: #fcb42b;"></li>
		            <li class="color-swatch" style="background-color: #feecaf;"></li>

		            <li class="color-swatch" style="clear:left;background-color: #0c8918;"></li>
		            <li class="color-swatch" style="background-color: #80b135;"></li>
		            <li class="color-swatch" style="background-color:#c2c92a;"></li>
		            <li class="color-swatch" style="background-color:#e5f3d0;"></li>

		            <li class="color-swatch" style="clear:left;background-color:#374aae;"></li>
		            <li class="color-swatch" style="background-color:#1e9be8;"></li>
		            <li class="color-swatch" style="background-color:#59c3f9;"></li>
		            <li class="color-swatch" style="background-color:#b6e4fd;"></li>

		            <!-- 紫色 -->
		            <li class="color-swatch" style="clear:left;background-color:#8d4bbb;"></li>
		            <li class="color-swatch" style="background-color: rgb(166, 91, 203);"></li>
		            <li class="color-swatch" style="background-color:#cca4e3;"></li>
		            <li class="color-swatch" style="background-color: rgb(190, 119, 99);"></li>

		        	<li class="color-swatch" style="background-color: #212122;"></li>
		        	<li class="color-swatch" style="background-color: #757576;"></li>
		        	<li class="color-swatch" style="background-color: #c6c6c7"></li>
		        	<li class="color-swatch" style="background-color: #f5f5f4"></li>

		        </ul>
</div>

		     </div>

     </div>
     <ul class="nav nav-tabs" role="tablist" id="right-fix-tab">
	  <li class="nav-item"><a href="javascript:;" data-toggle="#features" aria-controls="features">特色功能</a></li>
	</ul>
	</div>
</div>
            </form>
          </div><!--editor2 end-->
      </div>
        </div><!--end flex-->


        </div><!-- end style-operate-area -->
        </div><!-- end w1-flex -->
      </div>

    </div><!--box end-->



<div  id="more-popover">

</div>

</div> <!-- end full-page -->

<style>
/* #preview-msg a.active{background: #FFF !important;}
.preview-375 .modal-dialog{width:375px;}
.preview-375 #preview-phone {width:375px;height:688px;}
.preview-375 #preview-body {margin-top:90px;height:525px;}
.preview-360 .modal-dialog{width:360px;}
.preview-360 #preview-phone {width:360px;height:658px;}
.preview-360 #preview-body {margin-top:90px;height:499px;}
.preview-320 .modal-dialog{width:320px;}
.preview-320 #preview-phone {width:320px;height:587px;}
.preview-320 #preview-body {margin-top:80px;height:444px;} */

#preview-body::-webkit-scrollbar {
 width: 0 !important;
}

#preview-body {
 -ms-overflow-style: none;
}

#preview-msg a.active {
 background: #fff !important;
}

#preview-body {
 overflow: -moz-scrollbars-none;
}

#preview-msg-content em {
 font-style: italic;
}

.preview-320 #preview-body ,
    .preview-375 #preview-body,
    .preview-360 #preview-body {
        margin: 0px;
    }



.preview-320 #preview-body {
 height: 545px;
 width: 435px;
 padding: 10px 53px 15px 62px;
}

.preview-360 #preview-body {
 height: 610px;
 width: 486px;
 padding: 10px 58px 15px 68px;
}

.preview-375 #preview-body {
 height: 750px;
 width: 445px;
 padding: 10px 35px 15px 35px;
}

.preview-320 .modal-dialog {
 width: 217.5px;
}

.preview-320 #preview-phone {
 width: 217.5px;
 height: 399px;
}

.preview-320 #preview-body {
 margin-top: 76.5px;
}

.preview-360 .modal-dialog {
 width: 243px;
}

.preview-360 #preview-phone {
 width: 243px;
 height: 445.5px;
}

.preview-360 #preview-body {
 margin-top: 85px;
}

.preview-375 .modal-dialog {
 width: 222.5px;
}

.preview-375 #preview-phone {
 width: 222.5px;
 height: 453px;
}

.preview-375 #preview-body {
 margin-top: 54px;
}

#preview-body {
 box-sizing: border-box;
 transform: scale(0.5);
 -ms-transform: scale(0.5);
 -moz-transform: scale(0.5);
 -webkit-transform: scale(0.5);
 -o-transform: scale(0.5);
 transform-origin: top left;
 -webkit-transform-origin: top left;
 -ms-transform-origin: top left;
 -moz-transform-origin: top left;
 -o-transform-origin: top left;
}

@media screen and (min-height: 800px) {

    .preview-320 #preview-body ,
    .preview-375 #preview-body,
    .preview-360 #preview-body {
        margin: 0px;
    }

 .preview-320 .modal-dialog {
  width: 348px;
 }

 .preview-320 #preview-phone {
  width: 348px;
  height: 638.5px;
 }

 .preview-320 #preview-body {
  margin-top: 122.5px;
 }

 .preview-360 .modal-dialog {
  width: 389px;
 }

 .preview-360 #preview-phone {
  width: 389px;
  height: 713px;
 }

 .preview-360 #preview-body {
  margin-top: 136px;
 }

 .preview-375 .modal-dialog {
  width: 356px;
 }

 .preview-375 #preview-phone {
  width: 356px;
  height: 725px;
 }

 .preview-375 #preview-body {
  margin-top: 86.5px;
 }

 #preview-body {
  box-sizing: border-box;
  transform: scale(0.8);
  -ms-transform: scale(0.8);
  -moz-transform: scale(0.8);
  -webkit-transform: scale(0.8);
  -o-transform: scale(0.8);
 }
}
</style>

<!--
<div id="qrcode-pannel" style="position:fixed;z-index:1000001;right:2px;margin-bottom:0;bottom:1px;width:360px;">

  <span class="float-right" onclick="$('#qrcode-pannel').hide();" style="cursor:pointer;font-weight:bold;font-size:12px;position: absolute;top: 5px;right: 8px;color: #333;">&times;关闭</span>
  <div class="panel-body" style="padding:0px;margin-top:22px;line-height: 0;">
    <a href="https://www.135editor.com/tools/goplat?referer=https%3A%2F%2Fwww.135plat.com%2Fcharge-service" target="_blank"><img style="width:360px;" src="http://qdn.135editor.com/1001/2017/FmlghPqHIjN9u4twCEw9DBammVo9.jpg"></a>
  </div>
</div> -->


<div class="modal fade preview-360" id="preview-msg" tabindex="-1" role="dialog" aria-hidden="true">
		<div class="modal-dialog">
		  <div class="modal-content" style="background: transparent;position:relative;box-shadow: none;border: none;">
			<div style="position:absolute;left:100%;top:80px;font-size: 12px;width: 90px;color:#FFF;opacity:1;">
			  <button type="button" class="close" style="color:#FFF;opacity:1;margin: 2px;float: none;" data-dismiss="modal"><span style="width: 60px;display: inline-block;font-size: 16px;">关闭 &times;</span></button>
			  <p><a href="javascript:void(0)" style="color: #333;padding: 10px 10px;display: inline-block;background:#eee;border-radius: 0 5px 5px 0;margin: 2px 2px 2px 0;display: block;" onclick="$('#preview-msg .active').removeClass('active');$(this).addClass('active');$('#preview-msg').addClass('preview-375').removeClass('preview-360').removeClass('preview-320');$('#preview-phone').addClass('phone-bg375').removeClass('phone-bg360');">5.5寸以上</a></p>
			  <p><a class="active" href="javascript:void(0)" style="color: #333;padding: 10px 10px;display: inline-block;background:#eee;border-radius: 0 5px 5px 0;margin: 2px 2px 2px 0;display: block;" onclick="$('#preview-msg .active').removeClass('active');$(this).addClass('active');$('#preview-msg').addClass('preview-360').removeClass('preview-375').removeClass('preview-320');$('#preview-phone').addClass('phone-bg360').removeClass('phone-bg375');">5.5寸屏</a></p>
			  <p><a href="javascript:void(0)" style="color: #333;padding: 10px 10px;display: inline-block;background:#eee;border-radius: 0 5px 5px 0;margin: 2px 2px 2px 0;display: block;" onclick="$('#preview-msg .active').removeClass('active');$(this).addClass('active');$('#preview-msg').addClass('preview-320').removeClass('preview-375').removeClass('preview-360');$('#preview-phone').addClass('phone-bg360').removeClass('phone-bg375');">5寸及以下</a></p>
			</div>
			<!-- <div id="preview-qrcode" style="position:absolute;left:-150px;top:80px;width:150px;text-align:center;background: #FFF;border: 1px solid #ccc;font-size: 13px;padding: 10px;">
			  <p>手机扫码预览</p>
			  <p><br /></p><img src="//by.135editor.com/img/ajax/circle_ball.gif">
			</div> -->
			<div class="modal-body preivew-dialog" style="overflow: hidden;padding: 0;">
			  <section id="preview-phone" class="phone-bg360" style="padding: 2px 0;border-radius: 28px;background-color: transparent;background-size: cover;">
				<section id="preview-body" style="overflow-x:hidden;overflow-y:auto;">
				  <section style="margin-bottom:28px;">
					<p style="font-size: 22px;line-height: 1.4;margin-bottom: 14px;letter-spacing: .034em;">文章的标题文字</p>
					<p style="font-size: 15px;color: rgba(0, 0, 0, 0.3);line-height: 20px;">
					  <a href="#" style="color: #576b95;margin-right: 10px">135编辑器</a>2021-07-16</p>
				  </section>
				  <section id="preview-msg-content"></section>
				  <p><br /></p>
				  <section id="preview-msg-footer">
					<div style="display: flex;justify-content: space-between;">
					  <div style="color: rgba(0, 0, 0, 0.3);font-size: 15px;">阅读 10万+ </div>
					  <div style="color: #576b95;background: url(https://bdn.135editor.com/files/201901/wechatlook.png)no-repeat;background-position: left;padding-left: 20px;">
						在看1350</div>
					</div>
				  </section>
				</section>
			  </section>
			</div>
		  </div>
		</div>
</div>

<!-- <div class="modal fade  preview-360" id="preview-msg" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog" >
    <div class="modal-content" style="background: transparent;position:relative;box-shadow: none;border: none;">
      <div style="position:absolute;left:100%;top:80px;font-size: 12px;width: 80px;color:#FFF;opacity:1;" >
        <button type="button" class="close" style="color:#FFF;opacity:1;margin: 2px;float: none;" data-dismiss="modal"><span style="width: 60px;display: inline-block;font-size: 16px;">关闭 &times;</span></button>
        <p><a href="javascript:void(0)" style="color: #333;padding: 10px 10px;display: inline-block;background:#eee;border-radius: 0 5px 5px 0;margin: 2px 2px 2px 0;display: block;" onclick="$('#preview-msg .active').removeClass('active');$(this).addClass('active');$('#preview-msg').addClass('preview-375').removeClass('preview-360').removeClass('preview-320');">iPhone 7+</a></p>
        <p><a class="active" href="javascript:void(0)" style="color: #333;padding: 10px 10px;display: inline-block;background:#eee;border-radius: 0 5px 5px 0;margin: 2px 2px 2px 0;display: block;" onclick="$('#preview-msg .active').removeClass('active');$(this).addClass('active');$('#preview-msg').addClass('preview-360').removeClass('preview-375').removeClass('preview-320');">5.5寸屏</a></p>
        <p><a href="javascript:void(0)" style="color: #333;padding: 10px 10px;display: inline-block;background:#eee;border-radius: 0 5px 5px 0;margin: 2px 2px 2px 0;display: block;" onclick="$('#preview-msg .active').removeClass('active');$(this).addClass('active');$('#preview-msg').addClass('preview-320').removeClass('preview-375').removeClass('preview-360');">5寸及以下</a></p>
      </div>
     <div class="modal-body" style="overflow: hidden;padding: 0;">
            <section id="preview-phone" style="padding: 2px 0;border-radius: 28px;background-color: #FFF;background-image:url(https://bdn.135editor.com/files/201904/65c9d425gw1f63gvt2wy7j20hs0wmdgf.jpg);background-size: cover;">
                    <section  id="preview-body" style="padding: 15px 10px;overflow-x:hidden;overflow-y:auto;">
                        <section style="margin-bottom:28px;">
                            <p style="margin-bottom: 14px;padding:0;font-size:24px;line-height: 1.6;">文章的标题文字</p>
                            <p style="font-size:14px;color: #8c8c8c;">2021-07-16 &nbsp; <a href="#" style="color: #607fa6;">公众号名称</a> </p>
                        </section>
                        <section id="preview-msg-content" ></section>
                        <p><br/></p>
                        <section id="preview-msg-footer" ><p style="color: #9c9c9c;">阅读 1000000+  &nbsp;&nbsp; <i class="fa fa-thumbs-o-up"></i> 1350</p></section>
                    </section>
            </section>
     </div>

    </div>
    </div>
</div> -->

<div class="card" id="tpl-brush-board" style="position: absolute;display:none;background:#FFF;width:400px; z-index: 9999;left: 30px; top: 60px;">
  <div class="card-header"> <span title="关闭" class="float-right" onclick="$('#tpl-brush-board').toggle();" style="cursor:pointer;">×</span>模板秒刷</div>
  <div class="card-body" id="tpl-brush-board-content" style="padding: 10px 20px;overflow-y:auto;">

  </div>
</div>

<div class="modal fade" id="vip-dialog" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog"  style="width:320px;max-width:320px;margin-top:20px;">
    <div class="modal-content" style="background: transparent;border: 0 none;">
      <div class="modal-header" style="border:0 none;position: absolute;right: -30px;">
        <button type="button" class="close text-white" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
      </div>
     <div class="modal-body" style="overflow: hidden;padding: 0;margin: 10px;">
        <a id="vip-dialog-link" href="//www.135editor.com/tools/goplat?referer=http%3A%2F%2Fwww.135plat.com%2Fcharge-service%3Ftrackid%3D3%26source%3Dvip_dialog" target="_blank"><img src="https://image.135editor.com/files/users/0/1/201802/Gu5fYgtz_AGKy.png"></a>
     </div>
     </div>
     </div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="true" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">保存个人模板</h4>
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
      </div>
      <div class="modal-body">
        <input type="hidden" name="cate_id" value="1">
        <p><input type="text" placeholder="请输入个人模板名称" name="template_name" id="dialog-template-name" class="form-control"></p>
        <!-- <p><label><input type="checkbox" name="push_tpl_center" value="1">发布到模板中心(不勾选时存为私人模板)</label> <a href="/audit-rules.html" target="_blank">审核规则</a> </p> -->
        <!-- <p><label id="auto_cover_tpl" class="hidden"><input type="checkbox" name="auto_cover_tpl" value="1">覆盖原有模板</label></p> -->
        <br/>
                <p>免费用户可保存3个个人模板</p>
        <p>如需保存更多个人模板， <a target="_blank" href="/charge-service.html?source=user-style">请升级成为付费会员。</a></p>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" id="dialog-save-template" class="btn btn-primary">保存</button>
      </div>
    </div>
  </div>
</div><!-- /.modal #myModal-->
<div class="modal fade" id="meitu-beautify" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog"  style="width:720px;max-width:720px;margin-top:20px;">
    <div class="modal-content">
      <div class="modal-header" style="border:0 none">
        <h4 class="modal-title">编辑图片</h4>
      	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
      </div>
     <div class="modal-body" style="overflow: hidden;padding: 0;margin: 10px;">
     	<div id="MeituContent">正在加载美图秀秀编辑器，请稍候重试...</div>
     </div>
     </div>
     </div>
</div>

<div class="modal fade" id="meitu-pingtu" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog"  style="width:720px;max-width:720px;margin-top:20px;">
    <div class="modal-content">
      <div class="modal-header" style="border:0 none">
        <h4 class="modal-title">简易拼图上传</h4>
      	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
      </div>
     <div class="modal-body" style="overflow: hidden;padding: 0;margin: 10px;">
     	<div class="alert alert-warning">
     		提示：① .图片拼接方式可上下拖动调整图片顺序，② .自由拼图方式可旋转图片、拖动调整图片位置，③ .模板拼图方式可拖动调整图片位置，④ .调整完成后，点击“上传”按钮。<br/>360极速浏览器的用户请换用360安全浏览器。
     	</div>
     	<div id="MeituPingTuContent">正在加载美图秀秀编辑器，请稍候重试...</div>
     </div>
     </div>
     </div>
</div>

<div class="modal fade" id="meitu-full" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog"  style="width:960px;max-width:960px;margin-top:20px;">
    <div class="modal-content">
      <div class="modal-header" style="border:0 none">
        <h4 class="modal-title">美图编辑上传</h4>
      	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
      </div>
     <div class="modal-body" style="overflow: hidden;padding: 0;margin: 10px;">
     	<div class="alert alert-warning">
     		提示：图片美化编辑完成后，点击顶部菜单“保存与分享”，然后点击“上传”即可将图片插入到编辑器中。360极速浏览器的用户请换用360安全浏览器。
     	</div>
     	<div id="MeituFullContent">正在加载美图秀秀编辑器，请稍候重试...</div>
     </div>
     </div>
     </div>
</div>

<div class="modal fade" id="paragraph-setting" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog"  style="width:600px;margin-top:20px;">
    <div class="modal-content">
      <div class="modal-header" style="border:0 none">
        <h4 class="modal-title">段落设置</h4>
      	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span></button>
      </div>
     <div class="modal-body" style="overflow: hidden;padding: 0;margin: 10px;">
     	<form class="form-horizontal">
     	<div>
     		<div class="col-sm-6">
     			<div class="form-group">
					<label class="col-sm-5 col-form-label">行高</label>
					<div class="col-sm-7 controls">
						<input class="form-control" value="1.5em" id="paragraph-lineHeight" type="text">
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-5 col-form-label">字体</label>
					<div class="col-sm-7 controls">
						<select  class="form-control" id="paragraph-fontFamily">
						<option value="微软雅黑">微软雅黑</option>
							<option value="宋体">宋体</option>
							<option value="楷体">楷体</option>
							<option value="黑体">黑体</option>
							<option value="隶书,SimLi">隶书</option>
							<option value="arial">arial</option>
							<option value="sans-serif">sans-serif</option>
						</select>
					</div>
				</div>
				 <div class="form-group">
					<label class="col-sm-5 col-form-label">字号</label>
					<div class="col-sm-7 controls">
						<input class="form-control" placeholder="字号" value="14px" id="paragraph-fontSize" type="text">
					</div>
				</div>
     		</div>
     		<div class="col-sm-6">
     			<div class="form-group">
					<label class="col-sm-5 col-form-label">首行缩进</label>
					<div class="col-sm-7 controls">
						<input class="form-control" id="paragraph-textIndent" value="0em" type="text">
					</div>
				</div>
     			<div class="form-group">
					<label class="col-sm-5 col-form-label">段前距</label>
					<div class="col-sm-7 controls">
						<input class="form-control" id="paragraph-paddingTop" value="5px" type="text">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-5 col-form-label">段后距</label>
					<div class="col-sm-7 controls">
						<input class="form-control" id="paragraph-paddingBottom" value="5px" type="text">
					</div>
				</div>
     		</div>
     	</div>


     	</form>
     </div>
     <div class="modal-footer text-right">
     	<button type="button" onclick="applyParagraph('active');" class="btn btn-primary" data-dismiss="modal">应用到本样式</button>
     	<button type="button" onclick="applyParagraph('all');" class="btn btn-warning" data-dismiss="modal">应用到全文</button>
     	<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
     </div>
    </div>
    </div>
</div>

<!-- 修改我的图片分类 -->
<div class="modal fade" id="myCate" tabindex="-1" role="dialog" aria-labelledby="myyCateLabel" data-backdrop="true" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">修改分类</h4>
          <button type="button" class="close" data-dismiss="modal">
            <span aria-hidden="true">&times;</span>
            <span class="sr-only">关闭</span>
          </button>
        </div>
        <div class="modal-body">
          <br /> 选择分类：&nbsp;&nbsp;
          <div tabindex="0" class="searchable-select">
            <span class="searchable-select-caret"></span>
            <div class="searchable-select-holder" id="cate-select-group-val"></div>
            <div class="searchable-select-dropdown searchable-select-hide">
              <input type="text" class="searchable-select-input">
              <button type="button" class="g-add-group">创建分类</button>
              <button type="button" class="g-add-group-article">创建分类</button>
              <div class="searchable-scroll" id="cate-select-group">
                <div class="searchable-has-privious searchable-select-hide">上滑更多...</div>
                <div class="searchable-select-items"> </div>
                <div class="searchable-has-next searchable-select-hide">下滑更多...</div>
              </div>
            </div>
          </div>
          <a href="/user_cates/mine?model=Uploadfile" target="_blank" class="categoriesLinkSource">管理分类</a>
          <br />
          <div class="free-user-tips mt-2" id="photoCategoriesShow">
            <p>免费用户可保存5个图片分类</p>
            <p>如需创建更多图片分类， <a target="_blank" href="/charge-service.html?source=user-style">请升级成为标准会员。</a></p>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <button type="button" class="btn btn-primary" id="dialog-save-cate">保存</button>
          <button type="button" class="btn btn-primary" id="dialog-save-cate-article">保存</button>
        </div>
      </div>
    </div>
</div>
<!-- 裁剪图片 -->
<div class="modal fade" id="save-image-cropper" tabindex="-1" role="dialog" style="z-index: 1000051">
	<div class="modal-dialog" style="width:650px;max-width:650px;margin-top:10%;">
	  <div class="modal-content">
		<div class="modal-header"><h3>裁剪图片</h3><button type="button" class="close btn" data-dismiss="modal" aria-hidden="true">×</button></div>
		<div class="modal-body" style="overflow: hidden;padding: 0;margin: 10px;text-align:left;">
		  <div style="border:0 none;text-align: left;">
		  <h4>提示：滚动鼠标滚轮可缩放图片，按微信公众号封面图2.35:1或1:1比例选择保留区域后，裁剪上传。</h4>
		  </div>
		  <div id="cropper-ratios" class="btn-group d-flex flex-wrap m-0" data-toggle="buttons" style="margin-bottom: 2px;">
		  </div>
		  <div style="height:245px;margin:5px 0;">
			  <img id="cropFileImage" style="max-height:245px !important;max-width: 100% !important;height: 100%;">
		  </div>
		  <div class="text-right"> <div id="uploadCropFileImage" class="btn btn-sm ml-auto btn-primary"> 保存/上传 </div> </div>
		  <div class="upload-filelist p-2 d-flex" id="fileuploadinfo_uploadcrop"></div>
		</div>
		</div>
	</div>
  </div>

<script type="text/javascript" src="/js/ueditor/ueditor.config.js?v=1011"></script>

        <script src="/js/ueditor/ueditor.all.min.js?v=1811"></script>
    <script src="/cache/1d6d52c06a-v1811.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function() {
		$('#login-link').attr('onclick', "window.open('/users/login?a=appsync&state=postmsg&layout=dialog_login&referer="+encodeURIComponent(window.location.href)+"','login','height=500,width=800,top=120,left='+(window.screen.availWidth/2-400)+',help=no,resizable=no,status=no,scroll=no');return false;");
		$('#register-link').attr('href', "/users/register");
	});
</script>

<script>

var message_positon = 'bottom-right';
var loading_more = false; //正在加载
var loading_filter = null;
var first_load = true; // 第一次加载刷新或者登录
var str_usedlist,usedList;
var PLAT_HOST = 'www.135editor.com';
var current_draft_id = null;
var auto_save_draft_interval = null ;


if(typeof($.cookie) == 'function' && !window.localStorage.styUsedList) {
    str_usedlist = $.cookie("styUsedList");
}
else{
    str_usedlist = window.localStorage.styUsedList;
}

var  initial_body_style = '';
var vip_user = false;
var vip_roles = [];
// // var loged_user = true;
//
var loged_user = false;

if(str_usedlist) {
	usedList = $.parseJSON(str_usedlist);
}
if(!usedList){
	usedList=[];
}

function keep_session(){
	var url = BASEURL + '/wxes/keep_session';
	ajaxActionHtml(url,null,function(html){ });
}

rs_callbacks.loginSuccess = function(request){
	if(request.ret == 0){
		publishController.close_dialog();
		//publishController.remove();
		$('#login_errorinfo').hide();
		if(sso.form){
			$(sso.form).trigger("submit");
			sso.form=null;
		}
		if(sso.callback){
			sso.callback.apply(sso.callback,sso.callback_args);
		}
        loged_user = true;

        if (typeof localStorage.team_id == "undefined") {
            localStorage.team_id = 0;
        }
        if (request.userinfo.Team && request.userinfo.Team.length > 0) {
            var team_ids = [];
            // console.log(request.userinfo.Team);
            // window.localStorage.setItem('userTeams', JSON.stringify(request.userinfo.Team));
            for (var i in request.userinfo.Team) {
                team_ids.push(request.userinfo.Team[i].id);
            }
            if (localStorage.team_id > 0 && jQuery.inArray(localStorage.team_id, team_ids) == -1) {
                localStorage.team_id = 0;
            }
            if (localStorage.team_id > 0) {
                //进入团队模式时，才转换VIP身份
                request.userinfo.role_id.push(9);
            } else {
                $("#cur-team-name").html('个人模式');
            }
        } else {
            localStorage.team_id = 0;
        }
        current_editor.options.uploadFormData.team_id = localStorage.team_id;

		//$('#tab-wxmsg-trigger').show();
		if( request.userinfo.role_id.length > 1 ) {
            vip_user = true;
            vip_roles = request.userinfo.role_id;
			autoSave();
			$('#vip-user-icon').show();
			current_editor.setPaidUser(true);
 		}
		else{
			setInterval( keep_session, 900 * 1000); //session expired 1440s. keep session
		}

		setTimeout(function(){
            first_load = true;
            keep_session();
            reloadStyleOperate(1);
            loadFavColor();
            loadjs('/signatures/jsvar');
        },600)

		$('#login-menus').removeClass('hidden');
		$('#login-menus').show();
		$('#login-links').remove();
		$('#login-user-name').html(request.userinfo.username);
		$('#login-user-id').html(request.userinfo.id);

		if( typeof(request.annouce_total) == "undefined" ) {
            getUnreadMsgNum(); //登录成功后(非消息中调用)，重新加载一次未读消息。 annouce_total仅消息返回中包含
        }
	}
	else{
		//$('#login_errorinfo').addClass('alert alert-danger').show().html(request.error);
	};
}

function loadFavColor(){

}

function save_as_tpl(styleFlag){
	publishController.close_dialog();
	$('#myModal').modal('show');
	$('#save-wx-msg-dialog').modal('hide');

	$('#dialog-save-template').unbind('click').click(function(){
		if($('#dialog-template-name').val() == ""){
			$('#dialog-template-name').focus();
		}
		else{
            window.ajaxAction( BASEURL +'/user_styles/saveTemplate',{
                name: $('#dialog-template-name').val(),
                content: !styleFlag ? current_editor.getContent() : current_editor.current_active_135item.prop('outerHTML')
            },null,function(request){
                if(request.ret == 0) {
                    $('#myModal').modal('hide');
                    window.showSuccessMessage(request.msg);
                }
                else{
                    window.showErrorMessage(request.msg);
                }
            });
		}
	});
}

function saveWxMsg(form){

	var postdata = $(form).serializeArray();

	// 将内容追加到提交的数据中
	postdata[postdata.length] = { name:'data[WxMsg][content]',value: getEditorHtml(true) };
	ajaxAction(form.action,postdata,form,function(request){
		if(request.ret == 0 ){
            $('#remoteName').val('');$('#remoteCoverimg').val('');$('#remoteSummary').val('');
            publishController.close_dialog();
            $('#save-wx-msg-dialog').modal('hide');$('.modal-backdrop').remove();   //期间可能弹出了其它的dialog,如选择封面等
            current_edit_msg_id = request.id;
            if(request.msg) {
                showSuccessMessage(request.msg,'center');
            }

		}
        else{
            if(request.id) {
                current_edit_msg_id = request.id;
                $('#WxMsgId').val(request.id);
            }
            if(request.msg) {
                showErrorMessage(request.msg,'center');
            }
        }
	});
	return false;

}
function saveTemplate(form){
	if(getEditorHtml() == ""){
		showErrorMessage("请先输入内容");
		return false;
	}

	//if(!sso.check_userlogin({"callback":saveTemplate,"callback_args":arguments}))
	//	return false;

	var tid = $('#template_id').val();
	if( tid ) {
		$('#myModal').modal('show');
		$('#dialog-save-template').unbind('click').click(function(){
			if($('#dialog-template-name').val() == ""){
				$('#dialog-template-name').focus();
			}
			else{
				$('#template_name').val($('#dialog-template-name').val());
				form.action = '/user_styles/saveTemplate';
				ajaxSubmitForm(form,function(request){
					$('#myModal').modal('hide');
					showSuccessMessage(request.msg);
				});
			}
		});
		return false;
	}

	//
	var url; var new_msg = false;
	if(current_media_id != null && current_media_idx != null) {
		url = '/wx_msgs/save?inajax=1&rethtml=1&mid='+current_media_id +'&idx='+current_media_idx;
	}
	else if(current_edit_msg_id) {
		url = '/wx_msgs/save/'+current_edit_msg_id+'?inajax=1&rethtml=1';
	}
	else{
		url = '/wx_msgs/save?inajax=1&rethtml=1'; new_msg = true;
	}

	publishController.open_dialog(url,{title:'保存图文',id:'save-wx-msg-dialog','width':900,'callback':function(dialog){
		//$('#save-wx-msg').click();
		//alert(dialog.find('.modal-body').text());
		var text = dialog.find('.modal-body').text();
        if( new_msg ) {
            $('#WxMsgName').val($('#remoteName').val());
            $('#WxMsgCoverimg').val($('#remoteCoverimg').val());
            $('#WxMsgSummary').val($('#remoteSummary').val());
        }

		var regTest = new RegExp("您没有权限进行此项操作");

		if( regTest.test(text) ){

			//showErrorMessage('没有权限保存消息，只能保存三个模板.付费后可无限制保存消息');

			dialog.modal('hide');

			$('#myModal').modal('show');
			$('#dialog-save-template').unbind('click').click(function(){
				if($('#dialog-template-name').val() == ""){
					$('#dialog-template-name').focus();
				}
				else{
					$('#template_name').val($('#dialog-template-name').val());
					form.action = '/user_styles/saveTemplate';
					ajaxSubmitForm(form,function(request){
						$('#myModal').modal('hide');
						showSuccessMessage(request.msg);
					});
				}
			});
		}
	}});

	var $dialogid = publishController.dialogid;
	$('#'+$dialogid).on('hidden.bs.modal', function (e) {
			$('#'+$dialogid).remove();
	});

	return false;
}

//document.oncontextmenu=function(e){return false;}
//window.localStorage.loadFeeds = 'true';


function showFullColorChange(){
	$('#all-style-color-panel').show();
}


function loadUserDrafts(){
	//loadLocalStorage();return;
	$.ajax({
		async:true,
		type:'get',
		url: '/drafts/lists?model=WxMsg&team_id=' + localStorage.team_id,
		success: function (data){
			publishController.open_html_dialog('user-draft-chooser','云端草稿箱');
            var html = '<div class="d-flex"><div class="col-md-6 draft-list content-body" style="overflow-y:auto;padding:0 10px;">'+data+'</div><div class="col-md-6 content-body" style="overflow-y:auto;padding:0 10px;"><div id="draft-priview-body"><p style="color:#999;">点击左侧草稿后，在此处预览</p></div></div></div>';
			$('#user-draft-chooser').find('.modal-body').css({'height':$(window).height()-120}).html(html);
            $('#user-draft-chooser').find('.content-body').css({'height':$(window).height()-150});

            $(document).on('click','#user-draft-chooser a',function(){
                var url = $(this).attr('href');//更早草稿
                var re = /^#/;
                if( $(this).attr("target") == "_blank" || re.test(url) || typeof($(this).attr('onclick')) != "undefined" || url.substr(0,10).toLowerCase()=="javascript"){
                    //evt.stopPropagation();
                    return true; // 当为锚点，javascript,或者定义了onclick 时，忽略动作
                    // 可以使用onclick="return true;"或者target="_selft"来忽略dialog中链接的绑定事件
                }
                $('#user-draft-chooser').find('.draft-list').load(url,function(){
                    //
                });
                return false;
            });

            /*$('#user-draft-chooser').find('a').unbind('click').click(function(){
                    var url = $(this).attr('href');//更早草稿
                    var re = /^#/;
                    if( $(this).attr("target") == "_blank" || re.test(url) || typeof($(this).attr('onclick')) != "undefined" || url.substr(0,10).toLowerCase()=="javascript"){
                        //evt.stopPropagation();
                        return true; // 当为锚点，javascript,或者定义了onclick 时，忽略动作
                        // 可以使用onclick="return true;"或者target="_selft"来忽略dialog中链接的绑定事件
                    }
                    $('#user-draft-chooser').find('.content-body').load(url,function(){
							e
                    });
                    return false;
                });*/
			$(document).on('click','#user-draft-chooser .draft-item',function(evt){
                evt = evt || window.event;
                var el = evt.target || evt.srcElement; console.log(el.tagName);
                if(el.tagName == "A"  ){
                    return false;
                }
                $('#user-draft-chooser .draft-item').removeClass('active');
                $(this).addClass('active');
                $('#user-draft-chooser #draft-priview-body').html('<span style="color:#999;">loading...</span>');
                var type = $(this).data('type');
                var url = BASEURL + '/drafts/'+(type=='old' ? 'view_old' : 'view')+'/'+ $(this).data('id')+'.json?_='+ Date.parse(new Date());
                ajaxAction(url,null,null,function(request){
                    if(request.data.Draft.content ){
                        $('#user-draft-chooser #draft-priview-body').html(request.data.Draft.content);
                    }
                });
            });
		},
		dataType:"html"
	});
}

function autoSave(){
	clearInterval(auto_save_draft_interval);
	auto_save_draft_interval = setInterval(function(){
		autoSavedraft();
	},300000); //每5分钟保存草稿
}

function use_draft(id,type) {
	var url = BASEURL + '/drafts/'+(type=='old' ? 'view_old' : 'view')+'/'+ id+'.json';
	ajaxAction(url,null,null,function(request){
		if(request.data.Draft.content ){
			setEditorHtml(request.data.Draft.content);
			publishController.close_dialog();
		}
	});
    return false;
}

function autoSavedraft(callback){
	var html = getEditorHtml(true);
	var strip = $.trim(strip_tags(html,'<img>'));
	if (strip != "" ) {//包含文字或图片时才保存
		ajaxAction('/drafts/save.json?team_id=' + localStorage.team_id,{'model':'WxMsg','id':current_draft_id,'data_id':current_edit_msg_id,'content':html},null,function(request){
			current_draft_id = request.id;
			if(typeof callback == 'function') {
				callback(request);
			}
			else if(request.msg){
				showSuccessMessage(request.msg);
			}
		});
	}
}

function loadLocalStorage(){
	if( window.localStorage){ // 本地临时存储编辑器内容，仅在刷新时保持内容至本地
		if(typeof window.localStorage._135content != "undefined"){
			//alert(window.localStorage._135content);
			//setEditorHtml(window.localStorage._135content);
			//var html = current_editor.parseInsertPasteSetHtml(window.localStorage._135content);
			var html = window.localStorage._135content;
			current_editor.setContent(html);
			setTimeout(function(){
				current_editor.fireEvent("catchRemoteImage");
			},5000);
			clean_135helper();
		}
		if(typeof window.localStorage._edit_msg_id != "undefined"){
			current_edit_msg_id = window.localStorage._edit_msg_id;
		}
	}
}

function loadWechatArticle(media_id, idx) {

	current_media_id = media_id;
	current_media_idx = idx;

	var url = BASEURL + '/wx_msgs/wechat_content/'+media_id+'/'+ idx;
	ajaxAction(url,null,null,function(request){
		if(request.content ){
			setEditorHtml(request.content);
		}
	});
}

function getEditorHtml( outer ){

	$( current_editor.selection.document ).find('p').each(function(){
        if($(this).find('img,audio,iframe,mpvoice,video').length == 0) {
            if($.trim(strip_tags($(this).html()))=="&nbsp;") {
                $(this).html('<br/>');
            }
            else if($.trim( strip_tags($(this).html()) )=="") { //由于各种编辑操作可能使内容包含了多余的空段落标签，需要去除(不含图片，不含换行)。如“<p><span style="font-size: 12px; "></span></p>”
                if($(this).find('br').length > 0) {
                    $(this).html('<br/>');
                }
                else{
                    if(!this.style.clear ) {
                        $(this).remove();
                    }
                }
            }
        }
	});

    // $( current_editor.selection.document ).find('img').removeAttr('data-ratio');

	clean_135helper();

    var outers = $( current_editor.selection.document ).find('.article135,[data-role=outer],[label*=135editor]');

	if( outers.length > 1 ) {
        for(var i=outers.length-1;i>0;i--) {
            var $this = outers.eq(i);
            if( $this.get(0).style.backgroundColor && $this.get(0).style.backgroundColor != "" || $this.css('background-image') && $this.css('background-image')!='none') {
                $this.removeAttr('class');$this.removeAttr('label');
            }
            else{
                $this.replaceWith($this.html()); //文章中包含article135的class标签通通去掉，只保留内部的内容。
            }
        }
    }

	var html = '';
	if( current_editor.getWxContent && !outer ) {
		html = current_editor.getWxContent();
	}
	else{
		html = current_editor.getContent();
	}
	html = parse135EditorHtml( html );
	//return html;
	// 最外层增加一个节点，粘贴微信时，就不会生成多余的空格。
	//return $.trim(html);
	return '<section data-role="outer" label="Powered by 135editor.com" style="'+initial_body_style+'">'+ $.trim(html) + '</section>';
}

function templateCodePopup(id){console.log(id);window.open( '/editor_styles/'+id+'.html' )}

current_editor = UE.getEditor('WxMsgContent',{'hd_image':false,
    'parse_wx_image':false,
    'toolbars': [
           ["bold","italic","underline","forecolor","shadowcolor","backcolor","justifyleft","justifycenter","justifyright",'justifyjustify', "indent",'outpadding',"rowspacingtop",'rowspacingbottom',"lineheight",'letterspacing'],
           ['cleardoc',"paragraph","fontfamily","fontsize",'strikethrough','uploadword',"inserttable","insertimage",'music','insertvideo',"horizontal","removeformat",'formatmatch',"autotypeset"],
           ["source",'blockquote','remotecontent', 'spechars','link','superscript', 'subscript','insertorderedlist', 'insertunorderedlist',"undo","redo",'searchreplace','message','imgstyle']
        ],
    'version' : '1811',
    'uploadFormData':{'referer':'','query':'','team_id':localStorage.team_id},
    'plat_host':PLAT_HOST,
    'appkey': (getQueryVariable('appkey') ? getQueryVariable('appkey') : '566d34e0-4bac-443b-8a80-37f89fde689a'),
});


current_editor.ready(function(){
		current_editor.setContent('');
		$('#annoucement').hide(); //外部调用去除底部的提示语公告内容

	current_editor.addListener("clearDoc",function () {
        current_edit_msg_id = null;
        current_draft_id = null;
        window.localStorage._135content = "";
        current_media_idx = null;
        current_media_id = null;
        $('#template_id').val(''); $('#template_name').val(''); $('#dialog-template-name').val('');
        $('#remoteName').val('');$('#remoteCoverimg').val('');$('#remoteSummary').val('');
    });

	current_editor.addListener("fullscreenchanged",function (name,fullscreen) {
		if(fullscreen){
			$(document).scrollTop(0);
		}
		else{
			$(window).trigger('resize');
		}
    });
    current_editor.addListener("afterrendershortcutmenu",function () {
        $('.edui-shortcutmenu .js_tooltip').each(function(){
            $(this).attr('title', $(this).data('tooltip'));
        });
    });
    current_editor.addListener("click",function () {
        jQuery(document).trigger('mousedown.colorPicker');
        jQuery(document).trigger('click');
    });

	setTimeout(function(){
			//current_editor.execCommand('drafts');
		current_editor.execCommand( 'focus' );

		var editor_document = current_editor.selection.document;

        $('.edui-editor-toolbarbox .js_tooltip').each(function(){
            $(this).attr('title', $(this).data('tooltip'));
        });

         $('.edui-editor-toolbarbox .edui-button-body,.edui-editor-toolbarbox .js_tooltip').tooltip({'placement':'top','container':'body'});

		setInterval(function(){
            window.localStorage._135content = current_editor.getContent();
    	},60000);
		var onMessage = function(e){
            console.log(e);
			if(typeof e.data !== 'string') return;
			if(e.origin == 'http://mh.cliim.net' || e.origin == 'http://mh.cli.im' || e.origin == 'https://www.chuangkit.com' ) {
				return; //草料二维码。
			}

            if(e.origin == "http://www.soogif.com" || e.origin == "https://www.soogif.com" ){
                $("#iframeShade").remove();
                var url = event.data;
                if( url && current_edit_img ) {
                  current_edit_img.src = url;
                  current_edit_img.setAttribute("_src",url);
                }
                else{
                    insertHtml('<img src="'+url+'" _src="'+url+'">');
                }
                return;
            }

			if( e.data.substring(0,12) == 'loginSuccess' ) {
				publishController.close_dialog();
			}
			else if(e.data.substring(0,23) == '//imgpri.chuangkit.com/'){
				// 创客贴封面编辑完成。
				console.log('chuangkit');
			}
            else if ( e.data.substring( 0, 11 ) == "data:image/" ) {
                showSuccessMessage( "正在为您保存图片......" );
                ajaxAction(
                    "/uploadfiles/uploadBase64?team_id=" + localStorage.team_id,
                    e.data,
                    null,
                    function( data ) {
                        //console.log(data);
                        if ( data.ret == 0 && data.url ) {
                            showSuccessMessage( "图片保存成功" );
                            var range = current_editor.selection.getRange();
                            if ( !range.collapsed ) {
                                var img = range.getClosedNode();
                                if ( img && img.tagName == "IMG" ) {
                                    //选区为图片则切换图片地址
                                    img.src = data.url;
                                    img.setAttribute( "_src", data.url );
                                    var p = $( img ).parent(),
                                        prole = p.attr( "data-role" );
                                    if (
                                        prole == "circle" ||
                                        prole == "bgmirror" ||
                                        prole == "square" ||
                                        prole == "autocrop" ||
                                        prole == "link"
                                    ) {
                                        p.css( "backgroundImage", "url(" + data.url + ")" );
                                    }
                                    return;
                                }
                            }
                            insertHtml(
                                '<section class="_135editor"><p style="text-align:center;line-height:0em;"><img src="' +
                                data.url +
                                '"></p></section>'
                            );
                        } else if ( data.msg ) {
                            showErrorMessage( data.msg );
                        }
                    }
                );
            }
			else if(e.data.substring(0,3) == 'sg_'){
				// 搜狗浏览器的乱码。
				console.log('sg_transfer_send');
			}
			else if(e.data.indexOf("__append_editor__")==0){
				current_editor.execCommand('inserthtml', e.data.replace(/__append__/, ""));
			}
			else if( e.data.substring(0,1) == "<" ){
				current_editor.setContent(e.data);
			}
		}

		if (window.addEventListener) {  // all browsers except IE before version 9
		    window.addEventListener("message", onMessage, false);
		} else {
		    if (window.attachEvent) {   // IE before version 9
		        window.attachEvent("onmessage", onMessage);
		    }
		}
        // 如果是被企业调用打开，发送ready事件
        if (window.opener) {
            window.opener.postMessage({'ready': true}, "*");
        } else if (window.parent) {
            window.parent.postMessage({'ready': true}, "*");
        }


		function quickSave(e){
			// ctrl + s
			if( (e.ctrlKey || e.metaKey ) && e.keyCode == 83 ){
				console.log('save draft and open save dialog.');
				autoSavedraft();
				$('#save-as-template').trigger('click');
				return false; // 截取返回false就不会保存网页了
			}
		}
		// ctrl + s监听事件
		$(document).keydown(function(e){ return quickSave(e); });
		$(editor_document).keydown(function(e){ return quickSave(e); });
		$(window).trigger('resize');

	},300);

    current_editor.addListener("aftershowpop",function () {
        $('.edui-popup').Tdrag();
    });

});

function reloadStyleOperate( page ,filter ){
	$('#load-more-style').before('<div id="loading-style" style="margin:10px;color:red;text-align:center;"><img src="//by.135editor.com/img/ajax/circle_ball.gif"> 正在加载样式...</div>');
	var sort = $('#style-sorts .active').data('sort');
	var fav = $('#favtype .active input').val();
	var free = $('#recommend-free').prop('checked') ? 1 : 0;
	localStorage.recommendFree = free;

	$.ajax({
		async:true,
		type:'get',
		url: '/editor_styles/styles?inajax=1&page='+page+'&free='+free+'&fav='+fav+'&filter='+filter+'&sort='+sort + '&team_id='+ localStorage.team_id,
		success: function (data){

			$('#editor-template-scroll #loading-style').remove();

			if( first_load ) {
				$('#editor-template-scroll').html(data);
				$('#editor-template-scroll').scrollTop(0);
				$('#style-categories .filter.active').removeClass('active');
				$('#style-categories .filter').data('page',null).data('status',null);
				$('#left-operate-menu .filter:first').data('status',null).data('page',2);
				first_load = false;
			}
			else{
				// $('#load-more-style').remove();
				var newStyles = $('<div>'+data+'</div>').find('.editor-template-list > li');

				if(newStyles.length > 0) {
					var append_nums = 0;
					newStyles.each(function() {
						var $this = $(this);
						$this.addClass('mix').css({'display':'block'});

						if( $('#editor-template-scroll').find( "#"+$this.attr('id') ).length == 0) {
							append_nums ++ ;
							$('.editor-template-list').append( $this );

						}
					});

					setTimeout(function(){
						$("#editor-template-scroll img").lazyload({
							effect: "fadeIn",
							container:'#editor-template-scroll',
							data_attribute:'src',
							threshold : 50,
							failure_limit:50
						});
					},500);

					if(append_nums == 0) { loading_more = false;return true; }; //没有更多了
				}
				else{
					loading_filter.data('status','done');
					loading_more = false;
					return true; // 没有更多了
				}
			}

			loading_more = false; // 正在加载状态结束，待内容都置入页面之后。

			setTimeout(function(){
				$("#editor-template-scroll img").lazyload({
					effect: "fadeIn",
					container:'#editor-template-scroll',
					data_attribute:'src',
					threshold : 50,
					failure_limit:50
				});
			},500);

			$('.autonum').on('mousewheel', function(event) {//正文编辑区去掉滚动事件支持，易产生误操作。

                var numNode = jQuery(this);
                if( numNode.get(0).tagName == 'IMG' ){
                    num = numNode.attr('data-num') ? parseInt(numNode.attr('data-num')) : 1;
                }
                else{
                    num = numNode.attr('data-num') ? parseInt(numNode.attr('data-num')) : parseInt(numNode.text());
                }
                if( event.deltaY < 0 ) { //向下滚动
                    if(num <= 1) return ;
                    num = num -1;
                }
                else{
                    num = num + 1;
                }

                if( numNode.get(0).tagName == 'IMG' ){
                    numNode.attr('src',numNode.data('num'+num) );
                }
                else{
                    if( numNode.data('num'+num) ) {
                        numNode.html( numNode.data('num'+num) );
                    }
                    else{
                        numNode.html(num);
                    }
                }
                numNode.attr('data-num',num);
			    return false;
			}).tooltip({'title':'上下滚动鼠标，可调整序号大小',container: 'body'});

			page_loaded();
			//$('#left-side-affix').width($('#left-sidebar').width());


			//$('#left-side-affix').width($('#left-sidebar').width());
			$('[data-toggle="popover"]','#insert-style-list').popover();

			$('#btn-help').popover();
			$('#editor-type-pop').popover({
			  trigger: 'hover'
			});
		},
		dataType:"html"
	});
}


$(function(){
	getUnreadMsgNum();
	$('#recommend-free').prop('checked', parseInt(localStorage.recommendFree)?true:false)
	reloadStyleOperate(1);
	$('#editor-template-scroll').on('scroll',function(){
		if( !loading_more && $('#load-more-style').position().top < $('#editor-template-scroll').height() + 80 ) {
			if( $('#style-categories a.active:first').length > 0 ) {
				loading_filter = $('#style-categories a.active:first');
				if(loading_filter && loading_filter.data('status') ) {
					return true;
				}
				var page = loading_filter.data('page');
				if( !page || typeof(page) == 'undefined' ) { page = 1;}
				loading_more = true;reloadStyleOperate( page , loading_filter.data('filter') );
				loading_filter.data('page', parseInt(page) + 1);
			}
			else{
				loading_filter = $('#left-operate-menu .filter:first');
				if(loading_filter && loading_filter.data('status') ) {
					return true;
				}
				var page = loading_filter.data('page');
				loading_more = true;
				reloadStyleOperate( page );
				loading_filter.data('page',parseInt(page)+1);
			}
		}
		return true;
	});

    window.addEventListener("storage", function(e){
        //console.log(e.key + "=" + e.newValue);
        if( e.key == 'EditorStyle_newfavor' ){
            var url = BASEURL +'/editor_styles/styles?inajax=1&id='+e.newValue;
            $('<div></div>').load(url,function(){
                $(this).find('.editor-template-list li').prependTo( $('#editor-template-scroll .editor-template-list') );
            });
        }
    });

	$('#style-categories .filter').click(function(){ //,#style-sorts .sort
		$('#style-categories .filter.active').removeClass('active');
		$(this).addClass('active');
		$('.editor-template-list .style-item').hide();
		$('#editor-template-scroll').scrollTop(0);//切换分类时，回到顶部

		$('.editor-template-list').find( $(this).data('filter') ).fadeIn(500);
		setTimeout(function(){
			$('#editor-template-scroll').trigger('scroll');  // 样式筛选显示后，触发滚动
		},600);
		/*var filter = $(this).attr('data-filter');
		$('.sub-filter-tags').find('li').hide();
		$('.sub-filter-tags').find(filter).show();*/
		return false;
	});

	$('#style-categories .dropdown').hover( function(e){
        $(this).addClass('open');
    },function(){
    	$(this).removeClass('open');
    });

	$(document).on('click','#wechat-article-list .wechat-edit',function(){
		loadWechatArticle($(this).data('mid'), $(this).data('idx'));
		return false;
	});

	$(document).on('click','#last-used',function(){
		var last = $(this).data('last');

		/*if( usedList.length == 0 ) {
			showSuccessMessage('无最近使用样式');// 关闭搜索的显示
			return false;
		}*/
		var ids = usedList.toString();
		var search_height = $(window).height()-80-100;
		$('#styleRecentResult').height(search_height);
		$('#styleRecentList').height(search_height-75);

		if(last == ids) {
			$('#styleRecentResult').fadeIn('slow');
			return false; // 未变化
		}
		else {
			$(this).data('last',ids);
			$('#styleRecentResult').fadeIn('slow');
			$('#styleRecentList').scrollTop(0).load('/editor_styles/recent?inajax=1&ids='+ids +' #style_recent_list',function(data){
				;
			});
		}
	});

    var search_interval = null;
	$(document).on('keyup blur focus','#txtStyleSearch',function(){
        var that = this;
		var last = $(that).data('last');
		var word = $.trim(that.value);
		if( word == "" ||  word == " " ) {
			$('#styleSearchResult').fadeOut('slow');// 关闭搜索的显示
			return false;
		}
		var search_height = $(window).height()-80-10-100;
		$('#styleSearchResult').height(search_height);
		$('#styleSearchResultList').height(search_height-70);

		if(last == word) {
			$('#styleSearchResult').fadeIn('slow');
			return false; // 未变化
		}
		else {
            clearInterval(search_interval);
            search_interval = setTimeout(function(){
                $(that).data('last',word);
                $('#styleSearchResult').fadeIn('slow');
                $('#styleSearchResultList').load('/editor_styles/search?inajax=1&free=1&name='+word +' #style_search_list',function(data){
                    ;
                });
            },1000);
		}
	});


	//var html = $('#insert-style-list').html();
	//$('#insert-style-list').html(parseHtml(html,"rgb(255, 129, 36)","#FFF"));
	$('#left-operate-menu li a').click(function(){
		$(document).scrollTop(0);
		$('#styleSearchResult').fadeOut('slow');
		$('#moreColorSwatch').fadeOut('slow');
	});

	$(window).resize(function(){

        var navHeight = 50;
        		var win_height = $(window).height() - navHeight;
		//$('#full-page').height(win_height);


		var area_height = win_height - 2;
        		$('.w1').height(area_height); $('#insert-style-list').height(area_height);	 $('.editor2').height(area_height);

		$('#editor-template-scroll').height(win_height-6-$('#style-categories').height()); //subtract toolbar height


		$('.edui-editor-iframeholder').height(area_height-86-30);


		if( $(window).width() < $('body').width() ) {
			$('body').scrollLeft( $('body').width() - $(window).width() );
		}

		var btnTop = (win_height-$('.editorslide').height())/2;
		window.btnStyle=".editorslide{top:"+btnTop+"px !important;}";
		var cbtnTop = (win_height-$('#color-plan').height())/2;
		window.btnStyle +="#color-plan{top:"+cbtnTop+"px !important;display:block !important;}";


		// if(document.all){
		// 	document.createStyleSheet("javascript:btnStyle");
		// }else{
            if( $('#style-btn-color-position').length == 0 ) {
                var style = document.createElement('style');
                style.id = 'style-btn-color-position';
                style.type = 'text/css';
                style.innerHTML= window.btnStyle;
                document.getElementsByTagName('HEAD').item(0).appendChild(style);
            }
            else{
                $('#style-btn-color-position').html(window.btnStyle);
            }
		// }
		$('#right-pannel').height(win_height-72);
        $('#color-plan').show();

	}); // .trigger('resize');


	$('[data-toggle="popover"]','#insert-style-list').popover();
	$('.popover-trigger').popover({trigger:"hover"});
	$('#btn-help').popover();
	$('#editor-type-pop').popover({
	  trigger: 'hover'
	});


	//全选
    $(document).on('click', '#checkAllUpfile-article', function(event) {
        var flag = $(this).prop("checked")
        if (flag == true) {
            $('input[name="deleteuploadfilesarticle[]"]').each(function(index, el) {
                $(this).prop("checked",true)
            });
        }else {
            $('input[name="deleteuploadfilesarticle[]"]').each(function(index, el) {
                $(this).prop("checked",false)
            });
        }
    })
//批量分组
    $(document).on('click', '#cateCheckedUpfile-article', function(event) {
        var imgedit_id, cate, ids = [];
        $('input[name="deleteuploadfilesarticle[]"]:checked').each(function(index, el) {
            ids[ids.length] = this.value;
            if (index == 0) {
                imgedit_id = $(this).attr('data-id');
                cate = $(this).attr('data-cate');
            }
        });
        if (ids.length == 0) {
            return alert('没有选中任何文件');
        }
        $('.categoriesLinkSource').attr('href', '/user_cates/mine?model=WxMsg');
        $('#photoCategoriesShow').hide();
        $('#dialog-save-cate').hide();
        $('#dialog-save-cate-article').show();
        $('.g-add-group').hide();
        $('.g-add-group-article').show();

        initCateDataArticle(cate);
        setTimeout(function() {
            $('#myCate').modal({
                show: true
            })
            $('#myCate').find('.searchable-select-dropdown').addClass('searchable-select-hide');
            $('.searchable-select-input').val();
            $('#cate-select-group-val').attr({
                'data-id': imgedit_id,
                'data-gruop': ids
            });
        }, 200);
        event.stopPropagation();
    });
function initCateDataArticle(cate) {
    $('.searchable-select-items').html('')
    $.ajax({
        url: '/user_cates/getUserCates/WxMSg?team_id='+localStorage.team_id,
        type: 'GET',
        dataType: 'json',
        success: function(res) {
            var target = $('#cate-select-group').find('.searchable-select-items');
            jQuery.each(res, function(index, value) {
                $(target).append('<div class="searchable-select-item ' + (cate == index ? 'selected' : '') + '" data-cate="' + index + '" data-value="' + value + '">' + value + '</div>')
                if (cate == index) {
                    $('#cate-select-group-val').text(value).attr({
                        'data-value': index
                    });
                }
            });
        }
    })
}
    // 创建文章分类
    $(document).on('click', '.g-add-group-article', function(event) {
        event.stopPropagation()
        if ($('.searchable-select-input').val() == '') {
            return showErrorMessage('分组不能为空值')
        }
        if ($('.searchable-select-input').val().length > 8) {
            return showErrorMessage('名称长度请控制在8以内')
        }
        var arr = []
        var flag = true
        $('.searchable-select-item').each(function(index, item) {
            arr.push($(this).text())
        });
        arr.some(function(val) {
            if (val == $('.searchable-select-input').val()) {
                flag = false
                return true
            }
        })
        if (flag == false) {
            showErrorMessage("该分组已在您的列表中可选择，无需重复创建哦")
            return false
        }
        // 创建
        ajaxAction('/user_cates/add/WxMsg?team_id='+localStorage.team_id, {
            "referer": '#',
            "data[UserCate][model]": "WxMsg",
            "data[UserCate][name]": $('.searchable-select-input').val()
        }, null, function(res) {
            if (res.ret == 0) {
                showSuccessMessage(res.msg)
                $('#cate-select-group-val').text(res.data.UserCate.name);
                $('#cate-select-group-val').data('value', res.data.UserCate.id);
                // 创建后刷新下拉列表
                initCateDataArticle(res.data.UserCate.id);
                // _this.buildItems('1')
                // _this.hide();
            } else {
                showErrorMessage("创建失败")
            }
        })
    });
 // 保存文章分类
    $(document).on('click', '#dialog-save-cate-article', function(event) {
        var id = $('#cate-select-group-val').attr('data-id');
        var ids = $('#cate-select-group-val').attr('data-gruop');
        var cate = $('#cate-select-group-val').attr('data-value');
        if (cate == '') {
            $('#cate-select-group-val').focus();
            return
        }

            $.ajax({
                url: '/wx_msgs/multi_edit?team_id='+localStorage.team_id,
                type: 'POST',
                dataType: 'json',
                data: {
                    cate_id: cate,
                    ids: ids?ids:id
                },
            }).done(function(res) {
                showErrorMessage(res.msg);
                $('#myCate').find('button[data-dismiss="modal"]').click();
                 $('#server-btn').click()
            });

    })
//批量删除
    $(document).on('click', '#delCheckedUpfile-article', function() {
        if (!confirm('是否确认删除选择的文章？')) {
            return false;
        }
        var ids = [];
        $('input[name="deleteuploadfilesarticle[]"]:checked').each(function() {
            ids[ids.length] = this.value;
        });
        if (ids.length == 0) {
            alert('没有选中任何文件');
        } else {
            ajaxAction('/wx_msgs/trash/'+ids.join(), null, null, function(res) {
                console.log(res)
                if (res.ret == 0) {
                    showSuccessMessage(res.msg);
                    $('#server-btn').click()
                }
                else{
                    showErrorMessage(res.msg);
                }
            });
        }
    });

});
</script>

<script src="/cache/0a8608b980-v1811.js" type="text/javascript"></script>
<script>
$(function(){
    var _memoryColors = [];
    for(var i in fav_colors) {
        fav_colors[i] = hex2rgb(fav_colors[i]);
        if(fav_colors[i].indexOf('rgb(') >= 0) {
            _memoryColors[_memoryColors.length] = fav_colors[i].replace('rgb(','rgba(').replace(')',',1)');
        }
        else{
            _memoryColors[_memoryColors.length] = fav_colors[i];
        }
    }
	// var $colors = jsColorPicker('.colorPicker',{
	$('.colorPicker').colorPicker({
	    customBG: '#FFF',
	    size:2,
        multipleInstances:false,
        memoryColors:"'"+_memoryColors.join("','")+"'",
	    appenTo :'body',
	    mode:'hsv-h', //rgb-r
	    init: function(elm, colors) {
	      elm.style.backgroundColor = elm.value;
	      elm.style.color = colors.rgbaMixCustom.luminance > 0.22 ? '#222' : '#ddd';
	    }
	    /*,displayCallback:function(colors, mode, options){
	    	setBackgroundColor($(this).val(),'#FFF', 'all');
	    }*/
	});
	$('.colorPicker').blur(function(){
		setBackgroundColor(this.value,'#FFF',true);
		this.style.backgroundColor = this.value;
		this.style.color = '#FFF';
	});
	$('.colorPicker').keyup(function(){
		if(this.value.search('#') == 0){
			if(this.value.length ==7 ) { //|| this.value.length ==4
				$(this).trigger('focus.colorPicker');
			}
		}
		else{
			//alert(this.value.search('rgb'));alert(this.value.indexOf(")"));
			if( this.value.search('rgb') == 0 && this.value.indexOf(")") >0 ) {
				$(this).trigger('focus.colorPicker');
			}
		}
	});


	$(document).on('click','#flat-strip-shadow',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		obj.find('*').css('box-shadow','');
		var newHtml = obj.html();
		setDealingHtml(newHtml);
		obj = null;
		return false;
	});

	$(document).on('click','#flat-add-shadow',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');

		obj.find('*').each(function(){
				if( $(this).css('background-color') == 'transparent' ||  $(this).css('background-color') == '' ){
				}
				else{
					$(this).css('box-shadow','rgba(205, 205, 205,0.9) 2px 3px 2px');
				}
		});
		obj.find('hr').each(function(){
			$(this).css('box-shadow','rgba(205, 205, 205,0.9) 1px 1px 2px');
		})
		var newHtml = obj.html();
		setDealingHtml(newHtml);
		obj = null;
		return false;
	});


	$(document).on('click','#set-image-radius',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		obj.find('img').css('border-radius','50%'); //图片
		obj.find('.135bg').css('border-radius','50%'); //背景图片
		setDealingHtml(obj.html())
		obj = null;
		return false;
	});
	$(document).on('click','#set-image-border',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		obj.find('img').css({"background-color":"#fff","border-radius":"4px","max-width":"100%","padding":"4px","border":"1px solid #ddd"});
		setDealingHtml(obj.html())
		obj = null;
		return false;
	})

	$(document).on('click','#flat-add-radius',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		obj.find('*').each(function(){
			if( $(this).css('background-color') != 'transparent' &&  $(this).css('background-color') != '' ){
				$(this).css('border-radius','10px');
			}
			else{
				$(this).css('border-radius','10px');
			}

		});
		setDealingHtml(obj.html())
		obj = null;
		return false;
	});

	$(document).on('click','#flat-strip-radius',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		obj.find('*').css('border-radius','');
		setDealingHtml(obj.html())
		obj = null;
		return false;
	});

	$(document).on('click','#flat-add-border',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		obj.find('*').each(function(){
			if( $(this).css('background-color') != 'transparent' &&  $(this).css('background-color') != '' ){
				$(this).css('border','1px solid #efefef');
			}
		});
		//obj.find('._135editor').css('border','1px solid #efefef');
		setDealingHtml(obj.html())
		obj = null;
		return false;
	});
	$(document).on('click','#flat-strip-border',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');

		obj.find('*').each(function(){
			//if( $(this).css('background-color') == 'transparent' ||  $(this).css('background-color') == ''  ){
			//}
			//else{
				$(this).css('border','');
				$(this).css('border-width','0');
			//}
		});

		setDealingHtml(obj.html())
		obj = null;
		return false;
	});


	$(document).on('mouseout','#image-list .appmsg',function(){ //离开关闭预览图
		$('#image-preview').hide();
		return;
	});

	$(document).on('click','#checkAllUpfile',function(){ // 图片素材-我的上传全选
		if(this.checked){
			$('input[name="deleteuploadfiles[]"]:checkbox').prop('checked',true);
		}
		else{
			$('input[name="deleteuploadfiles[]"]:checkbox').prop('checked',false);
		}
	});
	$(document).on('click','#delCheckedUpfile',function(){
        if(!confirm('是否确认删除选择的图片？删除后，若文章或外网中使用了这些图片将无法显示，已微信发布的公众号文章不受影响。')){
            return false;
        }
		var ids = [];
		$('input[name="deleteuploadfiles[]"]:checked').each(function(){
			ids[ids.length] = this.value;
		});
		if(ids.length == 0) {
			alert('没有选中任何文件');
		}
		else{
			ajaxAction('/uploadfiles/deletes',{'ids':ids},null,function(request){
				if(request.ret == 0){
					for(var i in ids) {
						$('#uploadfile-'+ids[i]).remove();
					}
					showSuccessMessage(request.msg);
				}
				var page = 1;
				if( $('#my-file-list .ui-page-active:first').length > 0 ){
					page = $('#my-file-list .ui-page-active:first').html();
				}
				var tab_target = $('#editor-image-navtab  a:first');
				var old_url = tab_target.data('url');
				//data-refresh="always", 并增加页码，刷新到当前页面。
				tab_target.data('refresh','always').data('url','/uploadfiles/mine?inajax=1&page='+page+' #my-file-list').trigger('click').tab('show').data('refresh','none').data('url',old_url);
			});
		}
	});

	/* 预览图片素材 */
	$(document).on('mouseover','#image-list .appmsg  .cover',function(){ //悬浮预览图
		var src = $(this).find('img:first').attr('src'); //strip_imgthumb_opr();
		$('#image-preview').show().html('<p>图片预览</p><img src="'+src+'"/><p style="font-size:12px;color:#666;">'+src+'</p>');
		return;
	});
    //图虫已完成付费
    $(document).on('click','#tuchong-pay .payed',function(){
        var tuc_id = $(this).data('id');
        $('#image-'+tuc_id+' .cover').trigger('click');
    });
	/* 插入图片素材 */
	$(document).on('click','#image-list .appmsg .cover',function(event){
        var $this =  $(this);
		var $image = $(this).find('img:first');
        if($image.data('model') == 'Tuchong') {
            //检查是否下单与是否支付，未下单的自动下单。
            var tuc_id = $image.data('id');
            ajaxAction('/images/tuc_check/'+tuc_id,null,null,function(request){
                if(request.status == 1) { //已支付
                    showSuccessMessage('正在获取正版图片，完成后插入，请稍候...');
                    ajaxAction('/images/tuc_download/'+tuc_id,null,null,function(request){
                        //console.log(request);
                        if(request.ret == 0) {
                            insertHtml('<section class="_135editor"><p style="text-align:center"><img data-u="'+request.user_id+'" data-tcid="'+request.id+'" src="'+request.url+'"></p></section>');
                        }
                        else{
                            showErrorMessage(request.msg);
                        }
                    });
                }
                else{
                    publishController.open_msg_dialog('tuchong-pay','使用正版图','<p>您需要支付'+request.price+'元，购买图片后可使用</p><p>付费后表示您已同意图虫创意正版图片的使用协议</p><p></p><a target="_blank" href="/orders/pay/'+request.order_id+'" class="btn btn-primary">立即付费</a> <button class="btn btn-default payed" data-id="'+tuc_id+'">已完成付费，插入图片</button></p>');
                }
            })


            return false;
        }

		var src = strip_imgthumb_opr($image.attr('src'));
		var range = current_editor.selection.getRange();
    	if (!range.collapsed) {
	        var img = range.getClosedNode();
	        if (img && img.tagName == 'IMG') { //选区为图片则切换图片地址
	        	img.src = src;
	        	img.setAttribute('_src',src);

	        	var p = $(img).parent();
            	if( p.attr('data-role') == 'circle' || p.attr('data-role') == 'bgmirror' || p.attr('data-role') == 'square' ){
                    p.css('backgroundImage','url('+img.src+')');
                }

	        	return;
			}
    	}

        var data_id = $image.data('id');
    	$image.attr('src',src);
		insertHtml('<section class="_135editor" data-id="image-'+data_id+'"><p style="text-align:center">'+$image.clone().removeAttr('data-id').prop('outerHTML')+'</p></section>');
		if( $image.data('model')=='Image' ) {
			ajaxAction('/images/click_num',{id:data_id });
		}
		else if( $image.data('id') ) {
			style_click($image.data('id'));
		}
		return;
	});
	$(document).on('click','#image-list .appmsg .deleteMsg',function(e){
		if(confirm('确认要删除吗？删除后，若文章或外网中使用了此图片将无法显示，已微信发布的公众号文章不受影响。')) {
    		var id= $(this).data('id');
    		ajaxAction('/uploadfiles/delete/'+id,null,null,function(){
    			$('#uploadfile-'+id).remove();
    		});
    	}
    	e.stopPropagation();
    	return false;
	});

    $(document).on('dblclick','.edui-editor-imagescale',function(){
        var range = current_editor.selection.getRange(),
                img = range.getClosedNode();
        if (img && img.tagName == 'IMG'){
            $(img).trigger('dblclick');
        }

    });

	$(document).on('click','#insert-style-list .ui-portlet-list > li,#styleSearchResultList #style_search_list > ul > li,#styleRecentList #style_recent_list > ul > li',function(){
		//data-135editor=\"true\"
		//多插入一个空行，防止有时无法选择到底部了，或者两个元素中间不方便插入内容。

        var id = $(this).data('id');

        if($(this).hasClass('ignore')){
            return false;
        }

        if( $(this).hasClass('vip-style') && !vip_user && window.vip_roles.length < 2 ) {
            if( !loged_user && !sso.check_userlogin() ){
                return false;
            }
            else{
            	show_role_vip_dialog(10,'vip_dialog_' + id);
                return false;
            }
        }

		var idx = jQuery.inArray(id, usedList);
		if( idx == -1 ){ // 不存在。
			usedList.unshift(id);
			if( usedList.length > 50 ) { //删错多余的部分
				usedList.pop();
			}
			window.localStorage.styUsedList = JSON.stringify(usedList);
		}
		else{ //存在则调整顺序至第一
			usedList.splice(idx, 1);
			usedList.unshift(id);
		}

		if($(this).hasClass('brush-image') ) {
			ajaxAction('/html_parsers/brushImage/'+id,{html:getSelectionHtml()},null,function(request){
				if(request.ret == 0){
					ret = insertHtml( request.html );
					showSuccessMessage(request.msg);
				}
				else{
					showErrorMessage(request.msg);
				}
			});
			return false;
		}

		var num,numNode,ret = false;
        numNode = $(this).find('.autonum:first');
        if( numNode.length > 0 && numNode.get(0).tagName == 'IMG' ) {
            num = numNode.attr('data-num') ? parseInt(numNode.attr('data-num')) : 1;
        }
        else{
            num = numNode.attr('data-num') ? parseInt(numNode.attr('data-num')) : parseInt(numNode.text());
        }

		$(this).contents().filter(function() {
			return this.nodeType === 3 && $.trim($(this).text()) == "";
		}).remove();
		$(this).find('p').each(function(){
			if($.trim($(this).html())=="&nbsp;") {
				$(this).html('<br/>');
			}
		});
		$(this).find('*').each(function(){
			if($(this).attr('data-width')) {
				return;
			}
			if( this.style.width && this.style.width != ""  && this.style.width.search('%')>0 ) {
				$(this).attr('data-width',this.style.width);
			}
		});

		var style_item = $(this).find('> ._135editor:first'); //第一级的
		var rules = null;
		if( $(this).data('rules') ) {
			rules = eval('('+$(this).data('rules')+');');
		}

		if(style_item.length){
			// insertHtml( $(this).html() + "<p>&nbsp;</p>"); 包含收藏夹的删除按钮等
			/*if(strtolower(style_item.prop('tagName')) == 'img'){
				var html = style_item.prop('outerHTML');
				ret = insertHtml(html);
			}
			else */
			if(style_item.find('> *').length == 1 && style_item.find('> *').eq(0).hasClass('135editor') ) {
				// 只包含一个一级子元素，且为135样式。说明代码本身包含了135editor的class标记，只需要插入内部内容即可，无需再增加外围代码。
				ret = insertHtml( style_item.html(),rules );
			}
			else{
				var html = style_item.prop('outerHTML');
				ret = insertHtml( html,rules );
			}
		}
		else{ //最外围包装135editor容器
			ret = insertHtml("<section  data-id=\""+id+"\" class=\"_135editor\">" + $(this).html() + "</section>",rules);
		}

		if(ret){
			if(numNode.length > 0 && typeof num != "undefined") {
                num = num+1;
                if( numNode.get(0).tagName == 'IMG' ) {
                    numNode.attr( 'src',numNode.data('num'+num) );
                    numNode.attr('data-num',num);
                }
                else{
                    numNode.attr('data-num',num);
                    if(numNode.data('num'+num)) {
                        numNode.text( numNode.data('num'+num) );
                    }
                    else{
                        numNode.text(num);
                    }
                }
			}
			style_click($(this).data('id'));
		}
	});


	$(document).on('click','#tab-tpl-trigger',function(){ // 系统及收藏模板加载

		$('#editor-tpls-navtab a:first').trigger('click').tab('show');

	});
	$(document).on('click',function(event){
		var object = event.srcElement ? event.srcElement : event.target;
        if (jQuery(object).parents(".otf-poptools,.edui-popup-content,.edui-dialog,.edui-popup-body").length == 0) {
            clean_135helper();
        }
		if(! object || object.id != 'html-more-popover' ) { //非更多操作时，隐藏更多操作的浮层
			$('#html-more-popover').popover('hide');
		}
        if(! object || object.id != 'large-image-popover' ) { //
            $('#large-image-popover').popover('hide');
        }
		if(object && ($(object).parents('#color-plan').length > 0 || $(object).parents('.cp-app').length > 0 ) ) { //为调色板或者取色器时，不隐藏
			// 跳过
		}
		else{
			hideColorPlan();
		}
	});

	$(document).on('click','#tab-wxmsg-trigger',function(){ // 我的文章加载
		//if($('#editor-msg-list').html()=="")
		{
			if($('#editor-msg-list').find('.preloading').length == 0) {
				$('#editor-msg-list').prepend('<div class="preloading"><img src="//by.135editor.com/img/ajax/circle_ball.gif"> 正在加载</div>');
			}
			else{
				$('#editor-msg-list').find('.preloading').show();
			}
			$('#editor-my-msgs > .nav-tabs').find('a:first').tab('show');

			$('#wechat-article-list').html('');
			var url = '';
			var name = '';

			var cate_id = $('#wxmsg-mine-cateid').val() || '';

			if( $('#SearchWxMsgName').length > 0 ) {
				name = $('#SearchWxMsgName').val();
			}


			url = '/wx_msgs/mine?msg=all&cate_id='+cate_id+'&name='+name+'&team_id='+localStorage.team_id+' #wxmsg-mine-list';

			$('#editor-msg-list').html('<div class="preloading"><img src="//by.135editor.com/img/ajax/circle_ball.gif"> 正在加载</div>').load(url,function(){
				page_loaded();
			});
		}
	});

	$(document).on('change','#wxmsg-mine-cateid',function(){
		$('#tab-wxmsg-trigger').trigger('click');
	});
    $(document).on('mouseup','#insert-style-list .pagelink a',function(){
        $('#insert-style-list').scrollTop(0);
        return true;
    });

	$(document).on('click','#editor-msg-list .pagelink a',function(){
		var url = $(this).attr('href');
		$('#editor-msg-list').html('<div class="preloading"><img src="//by.135editor.com/img/ajax/circle_ball.gif"> 正在加载</div>').load(url+' #wxmsg-mine-list',function(){
			page_loaded();
		})
		return false;
	});

	/* 打开模板刷 */
	$(document).on('click','#tpl-tab-content .open-tpl-brush',function(){

		$('#annoucement').hide('slow');

		var tid = $(this).data('id');
        ajaxAction('/editor_styles/view/'+tid+'.json?nolazy=1',null,null,function(request){
            //$content =
            if(request.ret == 0) {
                $('#tpl-brush-board-content').html( request.data.EditorStyle.content  );
                var offset = $('#style-operate-area').offset();
                $('#tpl-brush-board').css('display','block').css('left',offset.left).css('top',offset.top);
                $('#tpl-brush-board').width($('#insert-style-list').width());
                $('#tpl-brush-board-content').height($('#insert-style-list').height()-70);

                /*** 绑定模板秒刷的事件 ***/
                $('#tpl-brush-board-content').find('._135editor').addClass('clearfix').css({
                    'border':'1px solid #ddd','padding':'10px','margin':'5px 0'
                  });
                $('#tpl-brush-board-content ._135editor').tooltip({'title':'点击单独使用此样式','placement':'top','container':'body'});

                $('[data-toggle="tooltip"]','#tpl-brush-board-content').tooltip();
                $('[data-toggle="popover"]','#tpl-brush-board-content').popover();

                $('#tpl-brush-board-content ._135editor').unbind('hover');
                $('#tpl-brush-board-content').unbind('click').on('click','._135editor',function(e){
                    var style_item = $(this).clone();
                    style_item.find('._135editor').each(function(){
                        $(this).remove(); //在内嵌样式的对应位置添加空行，删除嵌套样式
                    });

                    insertHtml("<section data-id=\""+style_item.data('id')+"\" class=\"_135editor\">" + style_item.html() + "</section>");
                    e.stopPropagation();
                    return false;
                });
            }
            else{
                showErrorMessage('模板内容获取异常');
            }

        });

	});

	$(document).on('click','#user-style-list .editor-style-content',function(){ //插入个人模板
        insertHtml( $(this).html() );
    });

	/*插入模板 */
	$(document).on('click','#tpl-tab-content .insert-tpl-content',function(){ //选中模板后设置编辑器的内容

		var tid = $(this).data('id');
        ajaxAction('/editor_styles/view/'+tid+'.json?nolazy=1',null,null,function(request){
            //$content =
            if(request.ret == 0) {
                insertHtml("<section data-id=\""+tid+"\" data-tools=\"135编辑器\">" + request.data.EditorStyle.content + "</section>");
            }
            else{
                showErrorMessage('模板内容获取异常');
            }

        });
	});

	/*编辑用户样式 */
	$(document).on('click','#tpl-tab-content .user-style-toolbar .fa-edit',function(){ //选中模板后设置编辑器的内容
		var tid = 'us'+$(this).data('id');
		var obj = $('#template-'+tid);

		obj.contents().filter(function() {
			return this.nodeType === 3 && $.trim($(this).text()) == "";
		}).remove();
		obj.find('p').each(function(){
			if($.trim($(this).html())=="&nbsp;") {
				$(this).html('<br/>');
			}
		});

        if(confirm('个人模板样式，将替换编辑框里的内容，请确认当前编辑的内容已保存。')) {
            setEditorHtml(obj.html());
        }

		var id = obj.data('id');

		$('#template_id').val(id.replace('us',''));
		$('#auto_cover_tpl').removeClass('hidden');
		$('#template_name').val(obj.data('name'));
		$('#dialog-template-name').val(obj.data('name'));
	});

	/*编辑用户样式 */
	$(document).on('click','#tpl-tab-content .user-style-toolbar .fa-trash',function(){ //删除用户个人模板
		var tid = $(this).data('id');
		var $this = $(this);
		var url = '/user_styles/delete/'+tid;
		if(confirm('是否确认删除此个人模板')) {
			ajaxAction(url,null,null,function(request){
				$this.parents('.col-sm-12:first').remove();
			});
		};
	});

    // 图分类: 展开, 收缩
    $(document).on("click", ".cate-box .more", function() {
        if ($(this).attr("data-open") == "1") {
            $(this).attr("data-open", "0");
            $(this).html("收缩").parents(".cate-box").addClass("open");
        } else {
            $(this).attr("data-open", "1");
            $(this).html("更多").parents(".cate-box").removeClass("open");
        }
        return;
    });

	$(document).on('click','.delete-msg',function(){
		var $this = $(this);
		var url = $(this).data('url');
		if(confirm('是否确认删除这条图文消息')) {
			ajaxAction(url,null,null,function(request){
				$this.parents('.article-msg:first').remove();
			});
		}
	});

				$('#btn-choose-frag').click(function(){
					publishController.open_dialog('/frags/lists',{
						title:'插入每日一句',selector:'#Frag-list',width:900,
						callback:function($dialog){

							$dialog.find('.modal-body').prepend('<div class="clearfix"><a class="btn btn-primary btn-sm float-right" href="javascript:void(0)" onclick="$(\'#btn-choose-frag\').trigger(\'click\')"><i class="fa fa-refresh"></i> 换一批</a></div>');

							$dialog.find('.choose-frag').click(function(){
								var id = $(this).data('id');
								var html = '<section  class="_135editor" style="border: 0px none; padding: 0px;">'
									   + '<section style="margin: 1.5em 1em 1em; padding: 0px; border: 0px rgb(239, 112, 96); border-image-source: none; max-width: 100%; box-sizing: border-box; color: rgb(62, 62, 62); line-height: 25px;word-wrap: break-word !important;">'
									      +  '<section style="max-width: 100%; box-sizing: border-box; line-height: 1.4; margin-left: -0.5em; word-wrap: break-word !important; color: inherit;">'
									         +   '<section style="max-width: 100%; box-sizing: border-box; border-color: rgb(241, 201, 196); padding: 3px 8px; border-radius: 4px; color: rgb(255, 255, 255); font-size: 1em; display: inline-block; transform: rotate(-10deg); transform-origin: 0% 100% 0px; word-wrap: break-word !important; background-color: rgb(239, 112, 96);">'
									             +   '<span class="135brush" data-brushtype="text" style="color: inherit; border-color: rgb(239, 112, 96);">每日一句</span>'
									          +  '</section>'
									       + '</section>'
									      +  '<section class="135brush frag" data-style="line-height:24px;color:rgb(89, 89, 89); font-size:14px" style="max-width: 100%; box-sizing: border-box; padding: 22px 16px 16px; border: 1px solid rgb(239, 112, 96); color: rgb(0, 0, 0); font-size: 14px; margin-top: -24px;">'
									        +   $('#frag-content-'+id).html();
									      +  '</section>'
									   + '</section>'
									+ '</section>';
								insertHtml(html);
								publishController.close_dialog();
							});


						}
					});
				});



	$(document).on('click','.article-msg a',function(e){
		e.stopPropagation();
		// e.preventDefault(); // 阻止冒泡但不屏蔽默认事件
	});

	$(document).on('click','#wxmsg-mine-list .article-msg,#wxmsg-mine-list .article-msg .opr-edit',function(){
		var id =  $(this).data('id');
		var creator =  $(this).data('creator');
		current_edit_msg_id = id; current_media_idx = null; current_media_id = null;
		var url = BASEURL + '/wx_msgs/spview/'+creator+'/'+id+'.json?nolazy=1';
		ajaxAction(url,null,null,function(request){
			if(request.ret ==0 && request.data ){
				if(request.data.WxMsg.content) {
					setEditorHtml(request.data.WxMsg.content);
				}
				else{
					setEditorHtml("");
				}
			}
			else{
			    showErrorMessage(request.msg);
            }
		});

	});

	$('#right-fix-tab > li > a').click(function(){

		var t = $(this).data('toggle');
		if($(t).hasClass('active')) {
			$(t).parent('.tab-content').hide();
			$(t).removeClass('active');
		}
		else{
			$('#color-choosen').removeClass('active');$('#features').removeClass('active');

			$(t).parent('.tab-content').show();
			$(t).addClass('active');
		}
	});

	/*$(document).on('click','.all-color-swatch',function(){
		$('.all-color-swatch').removeClass('active');
		$(this).addClass('active');
		var color = $(this).data('color'); //data-color为前景色，bgcolor为背景色，或者无背景文字的前景色
		var bgcolor = $(this).css('backgroundColor');

		$('#all-color-rgb-text').val(bgcolor).css('backgroundColor',bgcolor);
		if(!color)  color = '#FFF';

		parseObject($('.editor-template-list'),bgcolor,color);

	});*/

	$(document).on('click','.color-swatch',function(){
		$('.color-swatch').removeClass('active');
		$(this).addClass('active');
		var color = $(this).data('color'); //data-color为前景色，bgcolor为背景色，或者无背景文字的前景色
		var bgcolor = rgb2hex($(this).css('backgroundColor'));
		$('#custom-color-text').val(bgcolor).css('backgroundColor',bgcolor);
		if(!color)  color = '#FFF';
		setBackgroundColor(bgcolor,color, true);

		color_click(bgcolor);

		if( replace_full_color == false && ! current_editor.currentActive135Item()  ) {
			//showErrorMessage("请在内容中选择要换色的样式，<br/>或者勾选全文换色后操作");
			parseObject($('.editor-template-list'),bgcolor,color);
			// $('#editor-template-list > li').each(function(){
			// 	var obj = $(this);
			// 	parseObject(obj,bgcolor,color);
			// 	//$(this).attr('data-color',bgcolor);
			// });
		}
	});
	/*var default_color = $('.default-color').css('backgroundColor');
	$('#editor-template-list li > ._135editor').each(function(){
		parseObject($(this),default_color,'#FFF');
		$(this).attr('data-color',default_color);
	});*/

	$(document).on('click','#135-random-color',function(){
		var html = getDealingHtml();
		var obj = $('<div>'+html+'</div>');
		var bgcolors = ['#5BB75B','#2E8BCC','#F09609','#E51400','#7B4F9D','#E671B8','#008641','#20608E','#FFC40D'];

		var rd = Math.floor(Math.random() * ( bgcolors.length));
		var used = [];
		var current_bgcolor = bgcolors[rd];
		if(obj.find('._135editor').length > 0 ) {
			var components = obj.find('._135editor').each(function(i){
				if(i%random_color_step == 0){
					do
					{
						rd = Math.floor(Math.random() * ( bgcolors.length));
					}
					while(jQuery.inArray(rd,used) != -1);

					used[used.length] = rd;
					if( used.length == bgcolors.length ){
						used = [];
					}

					current_bgcolor = bgcolors[rd];
				}
				$(this).html(parseHtml($(this).html(),current_bgcolor,'#FFF'));
			});
		}
		else{
			$(obj).html(parseHtml($(obj).html(),current_bgcolor,'#FFF'));
		}


		setDealingHtml(obj.html())
		obj = null;
		return false;
	});

	$(document).on('click','#html-parsers-list .appmsg',function(){

		var rule_id = $(this).data('id');
		var data = {html:getEditorHtml(true)};
		$('#html-parsers-options :input').each(function(){
			data[this.name] = this.value;
		});
		ajaxAction('/html_parsers/parse/'+rule_id,data,null,function(request){
			if(request.ret == 0) {
				setEditorHtml(request.html);
				showSuccessMessage(request.msg);
			}
            else{
                showErrorMessage(request.msg);
            }
		});

	});

	$(document).on('click','#signature-list #no-signature',function(){
		$('body',current_editor.document).find('.assistant.prefix').remove();
		$('body',current_editor.document).find('.assistant.suffix').remove();
		return false;
	});

	$(document).on('click','#signature-list .signature',function(){
		$('body',current_editor.document).find('.assistant.prefix').remove();
		$('body',current_editor.document).find('.assistant.suffix').remove();
		$('body',current_editor.document).prepend('<section class="assistant prefix">'+$(this).data('prefix')+'</section>');
		$('body',current_editor.document).append('<section class="assistant suffix">'+$(this).data('suffix')+'</section>');
		return false;
	});


	$(document).on('click','#btn-new-msg',function(){
		if(confirm('是否确认清空内容并新建文档，清空后内容将无法恢复，请自行保存内容')) {
            current_editor.execCommand('cleardoc');
		}
	});

	$('#preview-editor').click(function(){
		$('#preview-msg-content').html(getEditorHtml(true));
		publishController.open_html_dialog('preview-msg');
	});


	$('#save-as-template').click(function(){
		saveTemplate(this.form);
	});

	$(document).on('click','#html-to-image',function(){
        if(loged_user) {
            current_editor.sync();
            if(current_editor.getContent() == "") {
                showErrorMessage('还没有输入内容','center');return false;
            }
            var form = $('#WxMsgViewForm').get(0);
            form.action = 'http://end14.135editor.com/downloads/htmlToImage?vip='+vip_user;
            form.submit();
        }
        else{
            sso.check_userlogin();
        }
	});
	$(document).on('click','#html-to-image-640',function(){
		//clean_135helper();
        if(vip_user) {
            current_editor.sync();
            if(current_editor.getContent() == "") {
                showErrorMessage('还没有输入内容','center');return false;
            }
            var form = $('#WxMsgViewForm').get(0);
            form.action = 'http://end14.135editor.com/downloads/htmlToImage?width=640&vip='+vip_user;
            form.submit();
        }
        else{
            showErrorMessage('640宽的长图需要升级vip才能使用','center');
            !loged_user && !sso.check_userlogin();
        }
	});
	$(document).on('click','#html-to-image-1080',function(){
        //clean_135helper();
        if($.inArray(9,vip_roles)>=0 || $.inArray("9",vip_roles)>=0 ) {
            current_editor.sync();
            if(current_editor.getContent() == "") {
                showErrorMessage('还没有输入内容','center');return false;
            }
            var form = $('#WxMsgViewForm').get(0);
            form.action = 'http://end14.135editor.com/downloads/htmlToImage?width=1080&vip='+vip_user;
            form.submit();
        }
        else{
            showErrorMessage('1080宽的长图需要企业VIP才能使用','center');
            !loged_user && !sso.check_userlogin();
        }
    });

	$('#third-callback').click(function(){
		if( !window.opener && !window.parent ) {
			alert("当前为外部开放调用模式，请检查是否正常打开。若想直接访问请打开网址 https://www.135editor.com");
		}

		if( window.opener ) { // 弹窗
			window.localStorage._135content = current_editor.getContent(); //保存现场
			//var submitIframe = document.getElementById("kuayu_iframe");
            //submitIframe.contentWindow.postMessage( getEditorHtml(true),"*" );
            window.opener.postMessage( getEditorHtml(true),"*" );
        }
		else if(window.parent){ // iframe 调用
			parent.postMessage( getEditorHtml(true),"*" );
		}
        window.close();
	});

	$('#replace-color-all').click(function(){
		if(this.checked){
			replace_full_color = true;
		}
		else{
			replace_full_color = false;
		}
	});

	$('#btn-favor-color').click(function(){

		if( !sso.check_userlogin() ) {
			return false;
		}
		var colors = $('#custom-color-text').css('backgroundColor');//.val();
		var color_array = [];
		color_array[0] = colors;
		var hasfavor = false;

		$('#favor-colors li').each(function(){
			if($.inArray($(this).css('backgroundColor'),color_array) == -1 ) {
				colors += ';'+$(this).css('backgroundColor');
			}
			else{
				hasfavor = true;
			}
		});
		if( hasfavor == false ) {
			setFavorColor(colors,function(){
				$('#favor-colors').prepend('<li class="color-swatch" style="background-color:'+ $('#custom-color-text').val() +' ;"><i title="删除" class="fa fa-remove"></i></li>');
			});
		}
		else{
			alert('此颜色已收藏');
		}
	});

	$(document).on('click','#favor-colors .fa-remove',function(e){
		if(confirm('是否确认要删除收藏的颜色？')) {
			e.preventDefault();e.stopPropagation();

			$(this).parent().remove();
			var colors = '';
			$('#favor-colors li').each(function(){
				colors += $(this).css('backgroundColor')+';';
			});
			setFavorColor(colors);
		}
		return false;
	});

	setTimeout(function(){
        $('#qrcode-pannel').hide();
		$('#editor-style-tips').remove();
        $('#announcement-tips').remove(); // 内容公告
        $('#user-unreadmsg-list').removeClass('show');//公告消息
        $(window).trigger('resize');
	},10000);

});
</script>

<script src="/cache/d2fa0813fb-v1811.js" type="text/javascript"></script><script>
ZeroClipboard.config( { swfPath: "/js/ZeroClipboard/ZeroClipboard.swf" } );
$(function(){
			var client = new ZeroClipboard( $('#copy-editor-html') );
			client.on( 'ready', function(event) {

			}).on( 'copy', function(event) {
                    var html = getEditorHtml(true);
                    event.clipboardData.setData('text/html',html );
                    //event.clipboardData.setData('text/plain', html );
                    showSuccessMessage("外网复制成功，请到其它网站粘贴使用",'center');
            }).on('error',function(event){
                $("#copy-editor-html").click(function(){
                    try {
                        var temp = current_editor.getContent();
                        current_editor.setContent(getEditorHtml());
                        current_editor.execCommand( 'selectall' );
                        current_editor.document.execCommand('copy');
                        current_editor.setContent(temp);
                    }catch (err){
                        showErrorMessage("复制失败，检查浏览器是否屏蔽Flash，请点击顶部导航“帮助中心”或者全选后“Ctrl+C”复制");
                    }
                });
            });
			var wxclient = new ZeroClipboard( $('#copy-wx-html') );
			wxclient.on( 'copy', function(event) {
				var html = getEditorHtml();
		  		event.clipboardData.setData('text/html',html );
		  		//event.clipboardData.setData('text/plain', html );
		  		showSuccessMessage("微信复制成功，请到微信后台粘贴使用。<p>互动类效果或图文复制微信后台出现样式错误的，请使用<a href='https://www.135editor.com/books/chapter/1/25' target='_blank' >微信授权同步功能</a>。</p>",'center');
			}).on('error',function(event){
                $("#copy-wx-html").click(function(){
                    try {
                        var temp = current_editor.getContent();
                        current_editor.setContent(getEditorHtml(true));
                        current_editor.execCommand( 'selectall' );
                        current_editor.document.execCommand('copy');
                        current_editor.setContent(temp);
                    }catch (err){
                        showErrorMessage("复制失败，检查浏览器是否屏蔽Flash，请点击顶部导航“帮助中心”或者全选后“Ctrl+C”复制");
                    }
                });
            });
});

</script>

	<script type="text/javascript" src="/signatures/jsvar"></script>
<link rel="stylesheet" type="text/css" href="/css/introjs.min.css" />
<script type="text/javascript" src="/js/intro.min.js"></script>
<script type="text/javascript" src="https://static.chuangkit.com/api/v4.js"></script>
<script>

$(function(){

    $('#favtype .btn').click(function(){
        first_load = true;
        setTimeout(function(){reloadStyleOperate(1);},200);
    });
    if( typeof(Promise) == 'function' ) {
        $(document).on('click','.fotor-design-button',function(){
            if( FotorFrame ) {
                FotorFrame.init(
                    'GrwA23',
                    null,
                    function(base64){
                        showSuccessMessage('正在为您保存编辑的图片，请稍候');
                        ajaxAction( BASEURL + '/uploadfiles/uploadBase64?model=WxMsg&field=coverimg',base64,null,function(data){
                            //console.log(data);
                            if(data.ret == 0 && data.url ) {
                                $('#WxMsgCoverimg').val(data.url);
                            }
                            else if(data.msg){
                                showErrorMessage(data.msg);
                            }
                        });
                        FotorFrame.hide();
                    },
                    'base64','auto',
                    function(){},
                    {locale:'zh_CN',hideVipContent:1}
                );
                FotorFrame.show('design', '', $(this).data('access'));
            }
            else{
                loadjs('https://static.fotor.com.cn/static/web/sdk/js/FotorFrameV6.min.js');
                showSuccessMessage('为您重新加载编辑脚本');
                $(this).trigger('click');
            }
        });
    }


    $(document).on('click','.chuangkit-design-button',function(){
        var option = {"data-access":"2221abf77d614e5d8bc1a0124378cc6a","data-exp":"1626489447000","sign":"",'data-charged-template-show':1,'data-ext-ref-user-flag':'','data-zIndex':'9000050',"signType":"MD5"};
        option['data-kind'] = $(this).attr('data-kind');option['data-exp'] = $(this).attr('data-exp');
		option['sign'] = $(this).attr('data-sign');
		option['data-ext-ref-user-flag'] = $(this).attr('data-ext-ref-user-flag');

        var cktIframe = new ChuangkitIframe(option);
        cktIframe.openIframe();
    });

    if($(window).width() > 1390 ) {
        $('#link-124').attr('href','/style-center?cate_id<>=3&order=updated&cols=4');
    }
})

setTimeout(function(){
    loadjs('//open.web.meitu.com/sources/xiuxiu.js');
    loadjs('//mh.cli.im/js/api.js');
    /*$('#user-unreadmsg-list').find('h3').remove();
    $('#user-unreadmsg-list').find('ul').each(function(i){
        if(i>0) {
            $(this).find('li').appendTo($('#user-unreadmsg-list ul:first'));
            $(this).remove();
        }
        else{
            $(this).addClass('marquee');
        }
    });*/
    //$('#user-unreadmsg-list ul').marquee({yScroll: "top"});

},5000);//延时5秒

/**创客贴**/
chuangkitComplate = function(eve){
	// eve.data为创客贴图片路径
    console.log(eve);
    if( eve['thumb-urls'] && eve['thumb-urls'][0] ) {
        var url = eve['thumb-urls'][0];
        showSuccessMessage('封面图片已生成，正在保存至135...');;
        ajaxAction('/uploadfiles/uploadByUrl',{uri:'http:'+url,name:'ck-design-id:'+eve['design-id']},null,function(request){
            if(request.url){
                $('#WxMsgCoverimg').val(request.url);
                showSuccessMessage(request.msg);
            }
        });
    }
}

function append_style(id,styles) {
    if( $('#'+id).length == 0 ) {
        var style = document.createElement('style');
        style.id = id;
        style.type = 'text/css';
        style.innerHTML= styles;
        document.getElementsByTagName('HEAD').item(0).appendChild(style);
    }
    else{
        $('#'+id).html( styles );
    }
}
function show_intro_tour( force ){
	if( !window.localStorage.intro || force ){
		$('#annoucement').hide();
		$('#left-operate-menu a:first').trigger('click');

		var introtour = introJs();
		introtour.setOption("nextLabel","下一步").setOption("prevLabel","上一步").setOption("doneLabel","完成").setOption("skipLabel","不用了，跳过");//.setOption("exitOnOverlayClick",false);
		introtour.oncomplete(function() {
			window.localStorage.intro = true;
		}).onexit(function() {
			window.localStorage.intro = true;
		});
		introtour.start();
	}
}
current_editor.ready(function(){
	$('#link-123').attr('data-step',6).attr('data-intro','素材库包含样式中心，模板中心、图库等，可以查看最新的素材，根据需要收藏喜欢的样式、图片等。')
	$('.edui-editor-toolbarbox').attr('data-position','left').attr('data-step',2).attr('data-intro','工具栏的各种按钮可以操作内容格式，上传图片，插入表格表情等。各个按钮都可以点一下试试哦');
	//show_intro_tour();
});
//publishController.open_html_dialog('qrcode-pannel');

function checkBrowser() {
    var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
    var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
    var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
    var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
    var isFirefox= navigator.userAgent.indexOf("Firefox")>0;
    if( isIE || isEdge || isIE11 || isFirefox) {
        showErrorMessage("推荐您使用谷歌浏览器或者猎豹、搜狗、360安全浏览器的极速模式访问");
    }
}
checkBrowser();

// 调整Pad上编辑器样式
function adjustPadEditorStyle () {
    if (navigator.userAgent.indexOf('iPad') < 0) {
        return
    }

    var overflow = $('.edui-editor-iframeholder').css('overflow')
    if (overflow == 'hidden') {
        $('.edui-editor-iframeholder').css({'-webkit-overflow-scrolling':'touch', 'overflow': 'auto'})
    } else {
        setTimeout(adjustPadEditorStyle, 2000)
    }
}
adjustPadEditorStyle();
</script>
<script src="/stats_days/numlog/Category/248?referer=&page=1"></script>
<script src="https://static.fotor.com.cn/static/web/sdk/js/FotorFrameV6.min.js"></script>

<style>
.n1-1 > li > a.introjs-showElement,#nav-header .nav>li>a.introjs-showElement{color:red;font-weight:bold;}
.introjs-prevbutton,.introjs-disabled,.introjs-bullets{display:none;}
</style>
</body>
</html>
